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



ZCMD Jetpack help - Fiore - 22.10.2012

Quote:

CMD:jetpack(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerid));
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK);
return 1;
}

This is the code, and i get this error:

Quote:

C:\Users\Fiore\Desktop\zGaming GM\zGaming RP\gamemodes\ZRP.pwn(16442) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Line 16442 is:

Quote:

if(sscanf(params, "u", playerid));




Re: ZCMD Jetpack help - SuperViper - 22.10.2012

pawn Код:
CMD:jetpack(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    new targetID;
    if(sscanf(params, "u", targetID)) return SendClientMessage(playerid, -1, "Syntax: /jetpack [player]");
    SetPlayerSpecialAction(targetID, SPECIAL_ACTION_USE JETPACK);
    return 1;
}



Re: ZCMD Jetpack help - Fiore - 22.10.2012

Nevermind, you wrong. There was a space between USE and JETPACK, now works fine.