A problem with a command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A problem with a command (
/showthread.php?tid=304686)
A problem with a command -
ViperStylez - 19.12.2011
Hello i got a problem.. i made a command but when i put it in the gamemode and compile it pawno gives me Don't Send error and i want to ask you where i had miss a word or a function downer is the command.. btw thanks for help
Код:
if(strcmp(cmd, "/usecookie", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCash] >= 5000)
{
if(PlayerInfo[playerid][pCookie] >= 5)
{
new exp = PlayerInfo[i][pExp];
PlayerInfo[i][pExp] = exp + 1;
SendClientMessage(playerid,COLOR_LIGHTGREEN, "Ai obtinuit un respect point pentru 5 cookie!;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN," Tu nu ai 5 cookie !");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN," Tu nu ai 5000$ !");
}
}
}
}
Re: A problem with a command -
Norck - 19.12.2011
Just remove last '}' in this code
Re: A problem with a command -
vassilis - 19.12.2011
pawn Код:
if(strcmp(cmd, "/usecookie", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCash] >= 5000)
{
if(PlayerInfo[playerid][pCookie] >= 5)
{
new exp = PlayerInfo[i][pExp];
PlayerInfo[i][pExp] = exp + 1;
SendClientMessage(playerid,COLOR_LIGHTGREEN, "Ai obtinuit un respect point pentru 5 cookie!;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN," Tu nu ai 5 cookie !");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN," Tu nu ai 5000$ !");
}
}
}
Re: A problem with a command -
ViperStylez - 19.12.2011
solved but now my cookie doesnt go down when i use the command so if i use it it doesnt give me -5 cookie.. even if i had put GivePlayerCookie(playerid, -5); can you tell me why? thanks.. i had put it at #define too
#define GivePlayerCookie.. please help me thanks....
Re: A problem with a command -
ViperStylez - 19.12.2011
solved thanks anyway..