Quote:
Originally Posted by Vanter
it is realistic, you're requesting something long.. okay,
pawn Код:
new CuffTimer[MAX_PLAYERS]; new CuffBreakFailed[MAX_PLAYERS]; //OnGameModeInIt SetTimer("PlayerOneSecondVariables",1000,1); forward PlayerOneSecondVariables(); public PlayerOneSecondVariables() { for(new i=0; i<MAX_PLAYERS; i++) { if(CuffTimer[i] >= 1) { CuffTimer[i] --; } if(CuffTimer[i] == 0) { new frand =random(10); if(frand < 6) { SendClientMessage(i, -1,"You've succefully broken your cuffs!"); IsCuffed[i] =0; ClearAnimations(i); } if(frand > 5) { SendClienrMessage(i, -1,"You've failed to break your cuffs!"); CuffBreakFailed[i] =30; } } if(CuffBreakFailed[i] >= 1) { CuffBreakFailed[i] --; } } return 1; }
dcmd_breakcuff(playerid,params[]) { #pragma unused params new string[128]; new ID; if(IsSpawned[playerid] != 1) { SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command."); return 1; } if(IsCuffed[playerid] == 0) { SendClientMessage(playerid, COLOR_RED, "You're not currently cuffed."); return 1; } if(CuffBreakFailed[i] > 1) { SendClientMessage(playerid, COLOR_RED, "You've recently tried but failed, please wait."); return 1; } CuffTimer[playerid] =10; SendClientMessage(playerid, -1,"You are breaking cuffs, please wait 10 seconds."); return 1; }
|
Wtf it keeps spamming ''You've succesfully break your cuffs'' you failed to break your cuffs etc. Now what?