Jetpack script
#1

I have this script:
Код:
   	if (strcmp("/jetpack", cmdtext, true, 10) == 0)
	{
		if GetPlayerScore(playerid) > 3);
		{
		SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
		}
		else
		SendClientMessage(playerid, 0xFFFFFF, "you don't have 3 score");
	return 1;
I think everything is fine but i get these errors:
Код:
error 001: expected token: "*then", but found ")"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 029: invalid expression, assumed zero
anyone help me?
Reply
#2

Код:
   	if (strcmp("/jetpack", cmdtext, true, 10) == 0)
	{
		if (GetPlayerScore(playerid) > 3)
		{
		SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
		}
		else
		{
		SendClientMessage(playerid, 0xFFFFFFFF, "you don't have 3 score");
		}
	
	return 1;
	}
Reply
#3

Quote:
Originally Posted by hittt
Посмотреть сообщение
Код:
   	if (strcmp("/jetpack", cmdtext, true, 10) == 0)
	{
		if (GetPlayerScore(playerid) > 3)
		{
		SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
		}
		else
		{
		SendClientMessage(playerid, 0xFFFFFFFF, "you don't have 3 score");
		}
	
	return 1;
	}
LoL, I missed thet xD, Thanks! Rep + for you!
Reply
#4

If you want the "you don't have 3 score" message to be true then:

pawn Код:
if(strcmp("/jetpack", cmdtext, true) == 0)
{
    if(GetPlayerScore(playerid) >= 3)
    {
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
    }
    else
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "you don't have 3 score");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)