SA-MP Forums Archive
Jetpack script - 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: Jetpack script (/showthread.php?tid=378428)



Jetpack script - KINGINA - 17.09.2012

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?


Re: Jetpack script - hittt - 17.09.2012

Код:
   	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;
	}



Re: Jetpack script - KINGINA - 17.09.2012

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!


Re: Jetpack script - iTorran - 17.09.2012

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;
}