30.06.2016, 22:03
(
Последний раз редактировалось Zeus666; 01.07.2016 в 05:45.
)
1.
Help please, I worked at those cmds so long, asked so much help and saw so many tutorials and can't see what's the problem.
Код:
public AjailCount(playerid) { if(pInfo[playerid][pJailTime] == 1) { new randSpawn = random(sizeof(randomSpawns_DayZSA_Part1)); SetPlayerPos_Allow(playerid,randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]); pInfo[playerid][pJailTime] = 0; } else if(pInfo[playerid][pJailTime] >= 2) { SetTimerEx("AjailCount",60000,false,"u",playerid); pInfo[playerid][pJailTime] -= 1; } return 1; } CMD:ajail(playerid, params[]) { new targetid, time, reason[64]; if(pInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not Admin"); if(sscanf(params, "uis[64]", targetid, time, reason)) return SendClientMessage(playerid, -1, "USAGE: /ajail <playerid> <time> <reason>"); if(time == 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Minimum 1 minute !"); SetPlayerPos(targetid, 346.870025, 309.259033, 999.155700); SetPlayerVirtualWorld(targetid, 2); SetPlayerInterior(targetid,6); pInfo[targetid][pJailTime] = time; new string[128], adminname[64], targetname[64]; format(string, sizeof(string), "Administrator %s ajailed %s, reason: %s", GetPlayerName(playerid, adminname, sizeof(adminname)), GetPlayerName(playerid, targetname, sizeof(targetname)), reason); SendClientMessageToAll(COLOR_RED, string); AjailCount(targetid); return 1; } CMD:unjail(playerid, params[]) { new targetid; if(pInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not admin !"); if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /unajail <playerid>"); if(pInfo[targetid][pJailTime] == 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not in the Ajail !"); new randSpawn = random(sizeof(randomSpawns_DayZSA_Part1)); SetPlayerPos_Allow(playerid,randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]); pInfo[playerid][pJailTime] = 0; return 1; } 1. It won't save that a player is in admin jail. It only teleports him, but you can't /unjail him and neither the time if passes it won't respawn him. I don't have Jailtime counter.. 2. When you use /unjail and respawns the player, it gives him blank screen. How Can I make him to respawn at some coordonates?
Help please, I worked at those cmds so long, asked so much help and saw so many tutorials and can't see what's the problem.