C:\Users\'Maikel\Desktop\JRP MYSQL 0.3Z\gamemodes\jrp03z.pwn(30937) : warning 209: function "@_yCajail" should return a value
C:\Users\'Maikel\Desktop\JRP MYSQL 0.3Z\gamemodes\jrp03z.pwn(30979) : warning 209: function "@_yCunjail" should return a value
pawn Код:
YCMD:ajail(playerid, params[], help)
{
if(help) return SCM(playerid, COLOR_GREY, "Not supported");
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pMod] == 1)
{
new id, time, reason[60], string[256];
if(sscanf(params, "uis[60]", id, time, reason)) return SCM(playerid, COLOR_GRAD, "USAGE: /ajail [playerid] [time(minutes)] [reason]");
PlayerInfo[id][pPrisons] += 1;
PlayerInfo[id][pAjailed] = 1;
PlayerInfo[id][pAjailTime] = time*60;
SetPlayerInterior(id, 69);
SetPlayerVirtualWorld(id, 69);
SetPlayerPos(id, -2154.1831,2878.2476,76.2766);
PlayerInfo[id][pDuty] = 0;
TextDrawShowForPlayer(id, Textdraw6969[id]);
format(string, sizeof(string), "Server: %s has been prisoned by Administrator %s, for %d Minutes, reason: %s.", GetPlayerNameEx(id), GetPlayerNameEx(playerid), time, reason);
SCMAll(COLOR_RED, string);
}
else
{
new string[128];
format(string,sizeof(string),"~n~~n~~w~You cannot use this command.");
TextDrawSetString(Textdraw69[playerid],string);
TextDrawShowForPlayer(playerid, Textdraw69[playerid]);
SetTimer("hidetextdraw", 4000, false);
return 1;
}
}
YCMD:unjail(playerid, params[], help)
{
if(help) return SCM(playerid, COLOR_GREY, "Not supported");
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pMod] == 1)
{
if(PlayerInfo[playerid][pAjailed] == 1)
{
new id, string[256];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD, "USAGE: /unjail [playerid]");
PlayerInfo[id][pAjailTime] = 0;
PlayerInfo[id][pAjailed] = 0;
PlayerInfo[id][pPrisons]-= 1;
SetPlayerInterior(id, 0);
SetPlayerVirtualWorld(id, 0);
SetPlayerPos(id, 448.9938,-1663.6447,25.5938);
TextDrawHideForPlayer(id, Textdraw6969[id]);
format(string, sizeof(string),"[INFO]: Admin %s has unjailed %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(id));
ABroadCast(COLOR_ORANGE,string, 5);
format(string, sizeof(string), "You have unjailed %s.",GetPlayerNameEx(id));
SCM(playerid, COLOR_BLUE, string);
format(string, sizeof(string), "Admin %s has unjailed you.",GetPlayerNameEx(playerid));
SCM(id, COLOR_BLUE, string);
}
else
{
new string[128];
format(string,sizeof(string),"This player is not in Ajail.");
SCM(playerid, COLOR_GRAD1, string);
}
}
else
{
new string[128];
format(string,sizeof(string),"~n~~n~~w~You cannot use this command.");
TextDrawSetString(Textdraw69[playerid],string);
TextDrawShowForPlayer(playerid, Textdraw69[playerid]);
SetTimer("hidetextdraw", 4000, false);
return 1;
}
}