Hat - 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: Hat (
/showthread.php?tid=393171)
Hat -
Akcent_Voltaj - 17.11.2012
i want to make it so i type once /sapca and i have hat on and another time /sapca to take off hat
PHP код:
if(strcmp("/sapca",cmdtext,true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
}
else
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
RemovePlayerAttachedObject(playerid,3);
}
Re: Hat -
Smally - 17.11.2012
Not quite sure why you are checking an else if as the same thing try this.
pawn Код:
if(strcmp("/sapca",cmdtext,true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) {
RemovePlayerAttachedObject(playerid,3);
}
}
Re: Hat -
Akcent_Voltaj - 17.11.2012
i have SetPlayerAttachedObject i couldent post it..special..thats why its else!
Re: Hat -
Smally - 17.11.2012
Well it's not helpful if you won't post the full code.
Re: Hat -
Akcent_Voltaj - 17.11.2012
PHP код:
if(strcmp("/sapca",cmdtext,true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerAttachedObject(playerid,3 , //NoNeed);
}
else
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
RemovePlayerAttachedObject(playerid,3);
}
}
Re: Hat -
Akcent_Voltaj - 17.11.2012
fixed !