COMMAND:prisao(playerid, params[]) { new timefixfix = timefix 60*60; new targetid,timefix,string[128],price,sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "uiii", targetid, timefix,price)) SendClientMessage(playerid, COLOR_LIGHTRED, "USE: /prisao [id] [tempo(minutos)] [fianзa($2000-$80000)-($0 Nenhuma)]"); else { if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "Vocк deve estar logado para utilizar este comando."); if (PlayerInfo[playerid][pdSuspensionDay] > 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк estб atualmente suspenso da LSPD!"); // if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode prender vocк mesmo."); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Este jogador nгo estб conectado !"); if(timefix < 1 || timefix > 3000) return SendClientMessage(playerid, COLOR_GREY, "O tempo nгo pode ser menor que 1 ou maior que 3000."); if(price != 0) { if(price < 2000 || price > 80000) return SendClientMessage(playerid, COLOR_GREY, "A fianзa nгo pode ser menos que 2000 ou maior que 80000."); } if(GetPVarInt(playerid, "Member") == 6 || GetPVarInt(playerid, "Member") == 7) { if(PlayerToPlayer(playerid,targetid,5.0)) { if(IsPlayerInRangeOfPoint(playerid,10.0,321.9542,314.4457,999.1484)) { new timefixfix = timefix 60*60; // if(GetPVarInt(targetid, "Strikes") >= 3) timefixfix = 999999999, SetPVarInt(targetid, "Changes", GetPVarInt(targetid, "Changes")+1); format(sendername, sizeof(sendername), "%s", PlayerName(playerid)), format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername), GiveNameSpace(giveplayer); format(string, sizeof(string), "[Prisгo]: O oficial %s prendeu %s na San Andreas High Facility Prison.", sendername, giveplayer); SendFactionMessage(7,COLOR_RED,string); if(price == 0) format(string, sizeof(string), "Vocк foi preso por %d minutos, Fianзa: Nenhuma.", timefix); else format(string, sizeof(string), "Vocк foi preso por %d minutos, Fianзa: $%d.", timefix, price); SendClientMessage(targetid, COLOR_LIGHTRED, string); // if(timefixfix == 999999999) SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк foi preso perpetuamente, digite (/mudarnome) para sair."); SetPVarInt(targetid, "Jailed", 3); SetPlayerPos(targetid, 257.6676,1425.4663,10.5930); SetPlayerInterior(targetid,0); SetPlayerVirtualWorld(targetid,0); SetPVarInt(targetid, "WantedLevel", 0); // else SetPVarInt(targetid, "Jailed", 4), SetPlayerPos(targetid,257.6676,1425.4663,10.5930); SetPVarInt(targetid, "Jailtime", timefix), SetPVarInt(targetid, "Arrest", GetPVarInt(targetid, "Arrest")+1); SetPVarInt(targetid, "Cuffed", 60), SetPVarInt(targetid, "Cuffedtimefix", 60); SetPVarInt(targetid, "InvWeapon", 0), SetPVarInt(targetid, "InvAmmo", 0); SetPVarInt(targetid, "DuffleBag", 0), SetPVarInt(targetid, "Bomb", 0); ResetPlayerWeaponsEx(targetid), RemovePlayerAttachedObject(targetid, HOLDOBJECT_GUN2); TogglePlayerControllable(targetid,true); for(new i = 0; i < 5; i++) { if(PlayerInfo[targetid][pTicket][i] > 0) { PlayerInfo[targetid][pTicket][i]=0; strmid(TicketReason[targetid][i], "None", 0, strlen("None"), 255); } } } else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб prуximo da prisгo."); } else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб prуximo suficiente deste jogador."); } } return 1; }
new timefixfix = timefix*60;
timefix*60
SetPVarInt(targetid, "Jailtime", timefix*60)
COMMAND:prisao(playerid, params[])
{
new targetid,timefix,string[128],price,sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "uii", targetid, timefix, price)) return SendClientMessage(playerid, COLOR_LIGHTRED, "USE: /prisao [id] [tempo(minutos)] [fianзa($2000-$80000)-($0 Nenhuma)]");
if(GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "Vocк deve estar logado para utilizar este comando.");
if(PlayerInfo[playerid][pdSuspensionDay] > 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк estб atualmente suspenso da LSPD!");
//if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode prender vocк mesmo.");
if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Este jogador nгo estб conectado !");
if(timefix < 1 || timefix > 3000) return SendClientMessage(playerid, COLOR_GREY, "O tempo nгo pode ser menor que 1 ou maior que 3000.");
if(price != 0)
{
if(price < 2000 || price > 80000) return SendClientMessage(playerid, COLOR_GREY, "A fianзa nгo pode ser menos que 2000 ou maior que 80000.");
}
if(GetPVarInt(playerid, "Member") == 6 || GetPVarInt(playerid, "Member") == 7)
{
if(PlayerToPlayer(playerid,targetid,5.0))
{
if(IsPlayerInRangeOfPoint(playerid,10.0,321.9542,314.4457,999.1484))
{
//if(GetPVarInt(targetid, "Strikes") >= 3) timefixfix = 999999999, SetPVarInt(targetid, "Changes", GetPVarInt(targetid, "Changes")+1);
format(sendername, sizeof(sendername), "%s", PlayerName(playerid)), format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid));
GiveNameSpace(sendername), GiveNameSpace(giveplayer);
format(string, sizeof(string), "[Prisгo]: O oficial %s prendeu %s na San Andreas High Facility Prison.", sendername, giveplayer);
SendFactionMessage(7,COLOR_RED,string);
if(price == 0) format(string, sizeof(string), "Vocк foi preso por %d minutos, Fianзa: Nenhuma.", timefix*60);
else format(string, sizeof(string), "Vocк foi preso por %d minutos, Fianзa: $%d.", timefix*60, price);
SendClientMessage(targetid, COLOR_LIGHTRED, string);
//if(timefixfix == 999999999) SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк foi preso perpetuamente, digite (/mudarnome) para sair.");
SetPVarInt(targetid, "Jailed", 3);
SetPlayerPos(targetid, 257.6676,1425.4663,10.5930);
SetPlayerInterior(targetid,0);
SetPlayerVirtualWorld(targetid,0);
SetPVarInt(targetid, "WantedLevel", 0);
//else SetPVarInt(targetid, "Jailed", 4), SetPlayerPos(targetid,257.6676,1425.4663,10.5930);
SetPVarInt(targetid, "Jailtime", timefix*60), SetPVarInt(targetid, "Arrest", GetPVarInt(targetid, "Arrest")+1);
SetPVarInt(targetid, "Cuffed", 60), SetPVarInt(targetid, "Cuffedtimefix", 60);
SetPVarInt(targetid, "InvWeapon", 0), SetPVarInt(targetid, "InvAmmo", 0);
SetPVarInt(targetid, "DuffleBag", 0), SetPVarInt(targetid, "Bomb", 0);
ResetPlayerWeaponsEx(targetid), RemovePlayerAttachedObject(targetid, HOLDOBJECT_GUN2);
TogglePlayerControllable(targetid,true);
for(new i = 0; i < 5; i++)
{
if(PlayerInfo[targetid][pTicket][i] > 0)
{
PlayerInfo[targetid][pTicket][i]=0;
strmid(TicketReason[targetid][i], "None", 0, strlen("None"), 255);
}
}
}
else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб prуximo da prisгo.");
}
else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб prуximo suficiente deste jogador.");
}
return 1;
}
if(price == 0) format(string, sizeof(string), "Vocк foi preso por %d minutos, Fianзa: Nenhuma.", timefix);
else format(string, sizeof(string), "Vocк foi preso por %d minutos, Fianзa: $%d.", timefix, price);
if(GetPVarInt(playerid, "Jailed") > 0) { format(string, sizeof(string), "Tempo de Sentenca: %d segundos.", GetPVarInt(playerid, "JailTime")); return GameTextForPlayer(playerid, string, 5000, 1); } |
if(GetPVarInt(playerid, "Jailed") > 0)
{
format(string, sizeof(string), "Tempo de Sentenca: %s.", Convert(GetPVarInt(playerid, "JailTime")));
return GameTextForPlayer(playerid, string, 5000, 1);
}
stock Convert(number)
{
new hours = 0, mins = 0, secs = 0, string[100];
hours = floatround(number / 3600);
mins = floatround((number / 60) - (hours * 60));
secs = floatround(number - ((hours * 3600) + (mins * 60)));
new days = 0;
if(hours >= 24)
{
days = floatround((hours/24), floatround_floor);
hours = hours % 24;
}
if(days > 0)
{
format(string, 100, "%ddias, %dh %dm e %ds", days, hours, mins, secs);
}
else if(hours > 0)
{
format(string, 100, "%dh %dm e %ds", hours, mins, secs);
}
else
{
format(string, 100, "%dm e %ds", mins, secs);
}
return string;
}
../gamemodes/OnCommand.pwn(12893) : error 001: expected token: ",", but found "-integer value-" ../gamemodes/OnCommand.pwn(12893) : warning 215: expression has no effect ../gamemodes/OnCommand.pwn(12893) : error 001: expected token: ";", but found ")" ../gamemodes/OnCommand.pwn(12893) : error 029: invalid expression, assumed zero ../gamemodes/OnCommand.pwn(12893) : fatal error 107: too many error messages on one line |
SetPVarInt(targetid, "Jails", GetPVarInt(targetid, "Jails")+1); |