SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian

Reply
 
Thread Tools Display Modes
Old 07/04/2017, 07:58 AM   #1
HzIoNuTZ
Little Clucker
 
Join Date: Dec 2016
Posts: 5
Reputation: 0
Default Ajutor la comanda /laptop.

Salut,acum cateva zile am incercat sa fac un system de laptop,am copiat ceva dintr-un server dini, pe un server MySQL si acum nu stiu ce sa-i fac..
Las comanda aici, poate ma ajuta cineva , multumesc!
Quote:
CMD:laptop(playerid, params[])
{
if(PlayerInfo[playerid][pLaptop] == 0) return SCM(playerid, COLOR_GREY, "Nu ai un laptop!");
new cmd[256],tmp[256];
cmd = strtok(cmdtext, idx);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_SERVER, "USAGE:{FFFFFF} /laptop [on/off]");
if(strcmp("on", tmp, true, strlen(tmp)) == 0) {
if(PlayerInfo[playerid][pLaptopStatus] == 0) return SCM(playerid, COLOR_GREY, "Laptop-ul tau este deja pornit.");
SCM(playerid, COLOR_GOLD, "Laptop-ul tau a fost {32B019}pornit{F2BA38} cu succes. Foloseste /mail pentru a trimite un email!");
PlayerInfo[playerid][pLaptopStatus] = 0;
}
else if(strcmp("off", tmp, true, strlen(tmp)) == 0) {
if(PlayerInfo[playerid][pLaptopStatus] == 1) return SCM(playerid, COLOR_GREY, "Laptop-ul tau este deja inchis.");
SCM(playerid, COLOR_GOLD, "Laptop-ul tau a fost {FF0000}oprit{F2BA38} cu succes.");
PlayerInfo[playerid][pLaptopStatus] = 1;
}
return 1;
}
HzIoNuTZ is offline   Reply With Quote
Old 07/04/2017, 08:10 PM   #2
wanted2013
Little Clucker
 
Join Date: Sep 2013
Posts: 8
Reputation: 0
Default Re: Ajutor la comanda /laptop.

Si ce nu-i bine? )
wanted2013 is offline   Reply With Quote
Old 07/04/2017, 08:44 PM   #3
Banditul18
Huge Clucker
 
Join Date: Nov 2014
Location: Brasov,Romania
Posts: 208
Reputation: 11
Default Re: Ajutor la comanda /laptop.

Mai multe informatii , eventual niste erori ceva. Nu suntem clarvazatori
__________________
My works:
[FS] Radio
Banditul18 is offline   Reply With Quote
Old 08/04/2017, 09:26 AM   #4
HzIoNuTZ
Little Clucker
 
Join Date: Dec 2016
Posts: 5
Reputation: 0
Default Re: Ajutor la comanda /laptop.

Mai jos
..
HzIoNuTZ is offline   Reply With Quote
Old 08/04/2017, 09:31 AM   #5
HzIoNuTZ
Little Clucker
 
Join Date: Dec 2016
Posts: 5
Reputation: 0
Default Re: Ajutor la comanda /laptop.

Ideea care e ,eu am facut sistemu de laptop si nu-mi da nici o eroare , am mai schimbat ceva la comanda si era ideea cand dai /laptop sa-l inchizi sa-l deschizi sa nu mai primesti mesaje...
Am lasat si comanda de /mail poate ajuta cu ceva.
Errorile au fost prima data acum primesti mesaje cand inchizi laptopul..
Quote:
CMD:mail(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa fii logat.");
if(IsPlayerConnected(playerid))
{
new string[128],id,mess[250],giveplayer[25],sendername[25];
if(PlayerInfo[playerid][pLaptop] == 0) return SendClientMessage(playerid, COLOR_WHITE,"{FFB870}Nu ai un laptop!");
if(PlayerInfo[playerid][pLaptopStatus] == 1) return SendClientMessage(playerid, COLOR_GREY, "Laptop-ul tau este inchis, nu poti trimite email-uri!");
if(PlayerInfo[playerid][pMuted] >= 1) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti vorbi, ai mute!");
if(sscanf(params, "us[250]",id,mess)) return SCM(playerid, COLOR_WHITE, "{B98300}Foloseste:{FFFFFF} /mail <Name/Playerid> <Message>");
if (IsPlayerConnected(id))
{
new giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
if(id == playerid) return SendClientMessage(playerid, COLOR_WHITE,"{FFB870}Nu poti sa-ti dai mesaj singur.");
if(PlayerInfo[giveplayerid][pLaptop] == 0) return SendClientMessage(playerid, COLOR_YELLOW, "Acel player nu are un laptop.");
if(PlayerInfo[giveplayerid][pLaptopStatus] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "Laptop-ul acelui player este inchis.");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(id, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "<Mail primit> %s[%d]: %s", sendername, playerid, mess);
SendClientMessage(id, COLOR_YELLOW, string);
format(string, sizeof(string), "<Mail trimis> %s[%d]: %s", giveplayer, playerid, mess);
SendClientMessage(playerid, COLOR_YELLOW, string);
new var100[300],resulttt[300],strr[300];
format(strr, sizeof(strr),"<Mail> %s",mess);
mysql_real_escape_string(strr, resulttt);
mysql_format(SQL,var100, sizeof(var100), "INSERT INTO chat_logs (`playerid`,`text`) VALUES ('%d','%s')", PlayerInfo[playerid][pSQLID],resulttt);
mysql_tquery(SQL,var100,"","");
if(FindIP(mess))
{
format(string, sizeof(string), "{990000}Staff Info: {FF6347}%s(%d) typed %s in /w.", sendername,playerid,mess);
ABroadCast(COLOR_WHITE,string,1);
}
for(new d; d<sizeof(TLD); d++)
{
if(strfind(mess,TLD[d],true) != -1 )
{
if(strfind(mess, "www.HardZonerpg.esy.es", true) != -1 || strfind(mess, "www.HardZonerpg.esy.es", true) != -1 || strfind(mess, "www.HardZonerpg.esy.es", true) != -1) break;
new reclama[MAX_PLAYER_NAME];
GetPlayerName(playerid, reclama, sizeof(reclama));
format(string, sizeof(string), "{f03337}AdmInfo: %s a primit ban de la AdmBot, motivul: Reclama!",reclama);
SendClientMessageToAll(COLOR_LIGHTRED,string);
Kick(playerid);
return 1;
}
}
for(new adm = 0; adm<=MAX_PLAYERS;adm++)
{
if(IsPlayerConnected(adm))
{
if(PlayerInfo[adm][pAdmin] > 0 && BigEar[adm] == 1)
{
format(string, sizeof(string), "<Mail> (%d) %s catre (%d) %s: %s",playerid,sendername,id,giveplayer,mess);
SendClientMessage(adm, COLOR_YELLOW, string);
}
}
}
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}Acest jucator nu este {33FF00}Online{FFFFFF}!");
}
}
return 1;
}

CMD:laptop(playerid, params[])
{
if(PlayerInfo[playerid][pLaptop] == 0) return SCM(playerid, COLOR_GREY, "Nu ai un laptop!");
new x_nr[10];
if(sscanf(params, "s[10]",x_nr)) return SCM(playerid, COLOR_WHITE, "{B98300}Foloseste:{FFFFFF} /laptop <On-Off>");
if(strcmp(x_nr,"on",true) == 0) {
if(PlayerInfo[playerid][pLaptopStatus] == 0) return SCM(playerid, COLOR_GREY, "Laptop-ul tau este deja pornit.");
SCM(playerid, COLOR_YELLOW, "Laptop-ul tau a fost {32B019}pornit{F2BA38} cu succes. Foloseste /mail pentru a trimite un email!");
PlayerInfo[playerid][pLaptopStatus] = 0;
}
if(strcmp(x_nr,"off",true) == 0) {
if(PlayerInfo[playerid][pLaptopStatus] == 1) return SCM(playerid, COLOR_GREY, "Laptop-ul tau este deja inchis.");
SCM(playerid, COLOR_YELLOW, "Laptop-ul tau a fost {FF0000}oprit{F2BA38} cu succes.");
PlayerInfo[playerid][pLaptopStatus] = 1;
}
return 1;
}
HzIoNuTZ is offline   Reply With Quote
Old 08/04/2017, 12:52 PM   #6
Banditul18
Huge Clucker
 
Join Date: Nov 2014
Location: Brasov,Romania
Posts: 208
Reputation: 11
Default Re: Ajutor la comanda /laptop.

PHP Code:
CMD:laptop(playeridparams[])
{
    if(
PlayerInfo[playerid][pLaptop] == 0) return SCM(playeridCOLOR_GREY"Nu ai un laptop!");
    new 
cmd[256],tmp[256];
    
cmd strtok(cmdtextidx);
    
tmp strtok(cmdtextidx);
    if(!
strlen(tmp)) return SendClientMessage(playeridCOLOR_SERVER"USAGE:{FFFFFF} /laptop [on/off]");
    if(
strcmp("on"tmptruestrlen(tmp)) == 0
    {
        
PlayerInfo[playerid][pLaptopStatus] = 0;
    }
    else if(
strcmp("off"tmptruestrlen(tmp)) == 0
    {
        
PlayerInfo[playerid][pLaptopStatus] = 1;
    }
    return 
1;

Asta ar fi , din cate am inteles din ce ai spus
__________________
My works:
[FS] Radio
Banditul18 is offline   Reply With Quote
Old 08/04/2017, 05:41 PM   #7
HzIoNuTZ
Little Clucker
 
Join Date: Dec 2016
Posts: 5
Reputation: 0
Default Re: Ajutor la comanda /laptop.

rezolvat,multumesc
HzIoNuTZ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ajutor cu o comanda Pa1N Romānă/Romanian 7 18/09/2014 03:50 PM
Ajutor Comanda CePaX Romānă/Romanian 3 24/07/2012 01:35 PM
ajutor la o comanda StR_MaRy Romānă/Romanian 3 31/12/2011 07:10 PM
Ajutor comanda VerSion Romānă/Romanian 1 31/10/2011 02:46 PM
Ajutor o comanda:) Crystyan12 Romānă/Romanian 1 08/04/2011 11:54 AM


All times are GMT. The time now is 02:04 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.