28.12.2012, 17:32
Ola Tava Colocando Uma HQ Mecanicos No Meu Sv Dai COloquei o /abastecer mais quando coloquei /abastecer deu isso no jogo :
Vocк Nao Esta No Posto De Gasolina
Olha o Codigo Do /Abastecer
Onde Que As Coordenadas Estao й dentro dakilo ali у IsAtGasStation
Codigo IsAtGasStation :
public IsAtGasStation(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(15.0,playerid,1941.9850,-1774.6639,19.7006))
if(PlayerToPoint(15.0,playerid,1378.3605,-1643.0701,13.5469))
{
if(IsAPlane(GetPlayerVehicleID(playerid)))
{
return true;
}
}
Vocк Nao Esta No Posto De Gasolina
Olha o Codigo Do /Abastecer
pawn Код:
if(strcmp(cmd, "/abastecer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid,COLOR_RED," Vocк nгo estб em um veнculo!");
new vid = GetPlayerVehicleID(playerid);
if(Gas[vid] >= 100)
return SendClientMessage(playerid,COLOR_RED,"POSTO: O tanque jб estб cheio.");
if(IsAtGasStation(playerid))
{
GameTextForPlayer(playerid,"~g~B~y~M~b~S~n~~w~Reabastecendo, Aguarde...~",3000,3);
SetTimer("Fillup",RefuelWait,0);
Controle(playerid, 0);
Refueling[playerid] = 1;
}
else
{
SendClientMessage(playerid,COLOR_GREY," Vocк nгo estб em um Posto de Gasolina");
}
}
return true;
}
Codigo IsAtGasStation :
public IsAtGasStation(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(15.0,playerid,1941.9850,-1774.6639,19.7006))
if(PlayerToPoint(15.0,playerid,1378.3605,-1643.0701,13.5469))
{
if(IsAPlane(GetPlayerVehicleID(playerid)))
{
return true;
}
}