if(strcmp(cmd, "/jail", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_RED, "USAGE: /jail [ID] [Minutes] [Reason]"); return 1; } new playa; new money; playa = strval(tmp); tmp = strtok(cmdtext, idx); if(PlayerData[playerid][Admin] < 3) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You are not admin level 3."); { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { new otherplayer = strval(tmp); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerData[playerid][onduty] == 0) return SendClientMessage(playerid, RED, "Your not on Administration duty!"); if(PlayerData[playerid][Admin] < PlayerData[otherplayer][Admin]) return SendClientMessage(playerid, RED, "You can't use this command on higher level Admins than yourself!"); format(string, sizeof(string), "*Administrator %s jailed %s for %d minutes – [Reason: %s]", sendername,giveplayer,PlayerData[playa][PrisonTime],result); SendClientMessageToAll(COLOR_RED1, string); ResetPlayerWeapons(playa); PlayerData[playa][Prison] = 1; GameTextForPlayer(playa, "~r~Admin Jailed", 3000, 3); SetPlayerInterior(playa, 6); SetPlayerPos(playa, 264.6288,77.5742,1001.0391); format(string, sizeof(string), "You are jailed for %d minutes – Reason: %s", PlayerData[playa][PrisonTime],result); SendClientMessage(playa, COLOR_RED1, string); PlayerData[playa][PrisonTime] = money*60000; SetTimerEx("JailTimerPassing",60000,1,"-",playa); } } } } return 1; }
Originally Posted by Weirdosport
SetTimerEx("JailTimerPassing",60000,1,"-",playa);
Not sure what made you put "-", but if "playa" is the playerid (integer) you need "i". |
public JailTimerPassing(playerid) { new string[256]; new playrname[MAX_PLAYER_NAME]; GetPlayerName(playerid, playrname, sizeof(playrname)); SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000); PlayerData[playerid][Prison] = 0; PlayerData[playerid][PrisonTime] = 0; SetPlayerArmour(playerid, 0); SetPlayerInterior(playerid,0); format(string, sizeof(string), "%s was unjailed automatically (Times Up).", playrname); SendClientMessageToAll(RED, string); SetPlayerPos(playerid,1480.9805,-1770.7013,18.7958); }