28.04.2018, 23:43
PHP код:
CMD:carregar(playerid, params[])
{
Player[playerid][pEmprego] = DOF2_GetInt(GetArquivo(playerid), "Emprego");
new index = random(sizeof(DesCaminhoneiro));
if(IsPlayerInRangeOfPoint(playerid, 10.0, -186.0883,-278.1851,1.0015))
{
if(Player[playerid][pEmprego] == 2)
{
for(new i; i < 10; i++)
{
if(GetPlayerVehicleID(playerid) == VehJob[i])
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, DesCaminhoneiro[index][0], DesCaminhoneiro[index][1], DesCaminhoneiro[index][2], 5.0);
GameTextForPlayer(playerid, "~r~carregado", 3000, 1);
SetTimerEx("CongelarPlayer", 0, false, "i", playerid);
SetTimerEx("DescogelarPlayer", 3000, false, "i", playerid);
TogglePlayerControllable(playerid, 1);
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
Trabalhando[playerid] = 1;
SendClientMessage(playerid, -1, "[Citizen] Vб atй o ponto de descarga.");
}
else
{
SendClientMessage(playerid, -1, "[Citizen] Vocк nгo estб no seu veнculo de trabalho.");
}
}
}
}else{
SendClientMessage(playerid, -1, "[Citizen] Vocк nгo estб na бrea de carregamento.");
}
return 1;
}