Jetpack command not working -
FireWarrior101 - 01.08.2013
////////////////////////////////////////////////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
Re: Jetpack command not working -
FireWarrior101 - 01.08.2013
ZZZzzzzzzzzz
Re: Jetpack command not working -
JimmyCh - 01.08.2013
Do not bump after an hour.
Anyway, use this:
pawn Код:
SetPlayerSpecialAction(playerid,2);
Re: Jetpack command not working -
Konstantinos - 01.08.2013
Quote:
Originally Posted by JimmyCh
Do not bump after an hour.
Anyway, use this:
pawn Код:
SetPlayerSpecialAction(playerid,2);
|
SPECIAL_ACTION_USEJETPACK is defined as 2, nothing changes..
pawn Код:
COMMAND:jetpack(playerid, params[])
{
if(gPlayerClass[playerid] != JETTROOPER) return 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");
return 1;
}
Re: Jetpack command not working -
FireWarrior101 - 01.08.2013
THis gave me errors
Re: Jetpack command not working -
JimmyCh - 01.08.2013
I know it's the same, but he used SPECIAL_ACTION_USE JETPACK, with a " "(space).
I made it easier for him.
Re: Jetpack command not working -
Konstantinos - 01.08.2013
Quote:
Originally Posted by FireWarrior101
THis gave me errors
|
There was space instead of '_'. I edited my post.
Re: Jetpack command not working -
Chrisis - 01.08.2013
Quote:
Originally Posted by FireWarrior101
////////////////////////////////////////////////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
|
TIP : next time use [PAWN] [&/PAWN] with out
& of course
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");
}
}
NOTE : maybe because you forget to set his class as jettrooper some where in your script
Re: Jetpack command not working -
FireWarrior101 - 01.08.2013
yes i forgot to reply it worked
but i need a few understand as i am a rookie but i have done alot of things for my gamemod in 2 days
need understand
pawn Код:
//JETPACK
COMMAND:jetpack(playerid, params[])
{
if(gPlayerClass[playerid] != JETTROOPER); [COLOR="Magenta"]Does != means that if the class isnt jettrooper u cant spawn jetpack somethin like that ? [/COLOR]
{
SendClientMessage(playerid, COLOR_RED, "[ERROR] {FFFFFF} Only Jettroopers can use jetpack");
}
else if(gPlayerClass[playerid] == JETTROOPER); ([COLOR="Magenta"]==[/COLOR] [COLOR="Lime"]means that the player class is JetTrooper ?)[/COLOR]
Re: Jetpack command not working -
Necip - 01.08.2013
About your question, yes it does. Also for pawn tags remove that "&".