This is not changing its special action [Why] :mad:
#1

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
Reply
#2

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;
}
Reply
#3

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(playeridparams[])
{
     if (
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE) {
           
SetPlayerSpecialAction(playeridSPECIAL_ACTION_HANDSUP);
     } else if (
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_HANDSUP) {
           
SetPlayerSpecialAction(playeridSPECIAL_ACTION_NONE);
     }
     return 
1;

Reply
#4

help still required guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)