01.08.2013, 18:08
Quote:
////////////////////////////////////////////////SERVER CMDS///////////////////////////
//JETPACK COMMAND:jetpack(playerid, params[]) { if(gPlayerClass[playerid] != JETTROOPER); { SendClientMessage(playerid, COLOR_RED, "[ERROR] {FFFFFF} Only Jettroopers can use jetpack"); } SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK); SendClientMessage(playerid, COLOR_RED, "{C3C3C3}[SERVER] {FFFFFF}You have successfully spawned a jetpack"); } i am working with this include #include <zcmd>//cmd Include i am making this jetpack command for a class so please help me correct it |
Ok , i see that you fergot "else" so instend of yours use this :
pawn Код:
//JETPACK
COMMAND:jetpack(playerid, params[])
{
if(gPlayerClass[playerid] != JETTROOPER);
{
SendClientMessage(playerid, COLOR_RED, "[ERROR] {FFFFFF} Only Jettroopers can use jetpack");
}
else if(gPlayerClass[playerid] == JETTROOPER);
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
SendClientMessage(playerid, COLOR_RED, "{C3C3C3}[SERVER] {FFFFFF}You have successfully spawned a jetpack");
}
}