new Float:Texaco[3][3] =
{
{2202.9646,2473.1289,10.4791},
{1595.0642,2199.4622,10.4803},
{2148.3413,2748.3240,10.8203}
};
command(abastecer, playerid, params[])
{
if(GetPlayerState(playerid != PLAYER_STATE_DRIVER))
return SendClientMessage(playerid, Cinza, "Vocк nгo estб em um carro ou nгo й o motorista");
{
for(new i; i != 3; ++i)
if(!IsPlayerInRangeOfPoint(playerid, 6.0, Texaco[i][0], Texaco[i][1], Texaco[i][2]))
return SendClientMessage(playerid, Azul, "Vocк nгo estб em um posto");
{
FuelTimer[playerid] = SetTimerEx("Abastecendo", 2500, true, "i", GetPlayerVehicleID(playerid), playerid);
}
}
return 1;
}
command(abastecer, playerid, params[])
{
if(GetPlayerState(playerid != PLAYER_STATE_DRIVER))
return SendClientMessage(playerid, Cinza, "Vocк nгo estб em um carro ou nгo й o motorista");
{
for(new i; i <= 3; ++i)
{
if(!IsPlayerInRangeOfPoint(playerid, 6.0, Texaco[i][0], Texaco[i][1], Texaco[i][2]))
return SendClientMessage(playerid, Azul, "Vocк nгo estб em um posto");
FuelTimer[playerid] = SetTimerEx("Abastecendo", 2500, true, "i", GetPlayerVehicleID(playerid), playerid);
}
}
return 1;
}
bom, toda vez que eu uso o comando /abastecer fala que nгo ta no posto, mais eu to !!
topo do gm : pawn Код:
pawn Код:
pq isso ![]() |
new Float:cordinatex,Float:cordinatey,Float:cordinatez;
new Float:Texaco[3][3] =
{
{2202.9646,2473.1289,10.4791},
{1595.0642,2199.4622,10.4803},
{2148.3413,2748.3240,10.8203}
};
command(abastecer, playerid, params[])
{
if(GetPlayerState(playerid != PLAYER_STATE_DRIVER))
return SendClientMessage(playerid, Cinza, "Vocк nгo estб em um carro ou nгo й o motorista");
{
for(new i; i != 3; ++i)
new rand = random(sizeof(Texaco));
cordinatex = Texaco[rand][0];
cordinatey = Texaco[rand][1];
cordinatez = Texaco[rand][2];
if(!IsPlayerInRangeOfPoint(playerid, 6.0, cordinatex,cordinatey,cordinatez))
return SendClientMessage(playerid, Azul, "Vocк nгo estб em um posto");
{
FuelTimer[playerid] = SetTimerEx("Abastecendo", 2500, true, "i", GetPlayerVehicleID(playerid), playerid);
}
}
return 1;
}
pawn Код:
|
enum PostoG
{
Float:PostoX,
Float:PostoY,
Float:PostoZ
}
new Texaco[3][PostoG] = {
{2202.9646, 2473.1289, 10.4791},
{1595.0642, 2199.4622, 10.4803},
{2148.3413, 2748.3240, 10.8203}
};
command(abastecer, playerid, params[])
{
if(GetPlayerState(playerid != PLAYER_STATE_DRIVER))
return SendClientMessage(playerid, Cinza, "Vocк nгo estб em um carro ou nгo й o motorista");
{
for(new i; i != 3; ++i)
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, Texaco[i][PostoX], Texaco[i][PostoY], Texaco[i][PostoZ]))
{
FuelTimer[playerid] = SetTimerEx("Abastecendo", 2500, true, "i", GetPlayerVehicleID(playerid), playerid);
}
}
}
return 1;
}