This is not changing its special action [Why] :mad: - 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: This is not changing its special action [Why] :mad: (
/showthread.php?tid=587304)
This is not changing its special action [Why] :mad: -
Hotspot - 29.08.2015
This is not changing its special action to NONE after HANDSUP,
CMD:handsup(playerid, params[])
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
}
return 1;
}
CMD:handsdown(playerid, params[])
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NON E);
}
return 1;
}
why is that help me fast guys
Re: This is not changing its special action [Why] :mad: -
YoussefHammad - 29.08.2015
have u realized there's a space between some letters ? o:
Код:
CMD:handsup(playerid, params[])
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
}
return 1;
}
CMD:handsdown(playerid, params[])
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
return 1;
}
Re: This is not changing its special action [Why] :mad: -
Logofero - 29.08.2015
Quote:
Originally Posted by Hotspot
This is not changing its special action to NONE after HANDSUP,
CMD:handsup(playerid, params[])
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
}
return 1;
}
CMD:handsdown(playerid, params[])
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NON E);
}
return 1;
}
why is that help me fast guys
|
Optimized code:
PHP код:
CMD:handsup(playerid, params[])
{
if (GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE) {
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
} else if (GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP) {
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
return 1;
}
Re: This is not changing its special action [Why] :mad: -
Hotspot - 31.08.2015
help still required guys