25.05.2010, 22:50
Hey Guys I'm trying to make it so if player's do /stuck It doesn't let them move IF They ARE Cuffed. Right now the /stuck command is supposed to unfreeze them when they are frozen,I made it so they can't move while they are frozen either. But when I try it when they are cuffed they get unfrozen anyways.
So what I'm trying to do is make it so a message pop's up so if they are cuffed it will say:You Are Cuffed you can't Unfreeze yourself!
Here's the code,Thanks For all Your help
So what I'm trying to do is make it so a message pop's up so if they are cuffed it will say:You Are Cuffed you can't Unfreeze yourself!
Here's the code,Thanks For all Your help
Code:
if(strcmp(cmd, "/stuck", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pFrozen] == 1) { SendClientMessage(playerid, COLOR_GREY, "You were frozen by an admin, you can't evade that!"); return 1; } else if(PlayerCuffed[giveplayerid] > 0) { SendClientMessage(playerid, COLOR_GREY, "You Are HandCuffed,You Can't Evade That!"); TogglePlayerControllable(giveplayerid, 0); return 1; } TogglePlayerControllable(playerid, 1); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /stuck",d,m,y,h,mi,s,sendername); AdminLog(string); } return 1; }