A problem with a command
#1

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$ !");
				}
			}
		}
	}
Reply
#2

Just remove last '}' in this code
Reply
#3

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$ !");
                }
            }
        }
Reply
#4

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....
Reply
#5

solved thanks anyway..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)