20.04.2015, 21:29
Quote:
Faзa uma variavel para verificar se o player usou /carregar ou nгo.
|
Adicione no topo do seu GM ou onde vocк organiza suas variбveis
PHP код:
new Carregou[MAX_PLAYERS];
PHP код:
if (strcmp("/descarregar", cmdtext, true, 8) == 0)
{
if(!Carregou[playerid]) return SendClientMessage(playerid, cor, "Vocк nгo tem nenhuma carga."); // somente essa linha foi adicionada.
if(Profissao[playerid] == Petroleiro)
if(PetroleiroChecks[playerid] == 2)
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1825.6751, -1634.5753, 12.9540))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,AMARELO,"Voce descarregou a carga com sucesso e ganhou $70!");
GivePlayerMoney(playerid, 70);
SetVehicleToRespawn(GetVehicleTrailer(GetPlayerVehicleID(playerid)));
}
return 1;
}
PHP код:
Carregou[playerid] = 1;