01.12.2011, 19:45
pawn Код:
if(strcmp("/baseheli", cmdtext, true, 10) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !IsPlayerInVehicle(playerid, heli))
return SendClientMessage(playerid, -1, " Vocк precisa estar dentro do heli !");
tmp = strtok(cmdtext, idx);
if(IsPlayerInAnyVehicle(playerid) == 0)
return SendClientMessage(playerid, -1, " Vocк Nao pode digitar esse comando sendo o piloto !");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
tmp = strtok(cmdtext, idx);
if(Z > 30.4057)
return RemovePlayerFromVehicle(playerid);
AttachObjectToVehicle(base, heli, -1.350097, -0.400024, -0.500000, 270.0, 180.0, 180.0);
SendClientMessage(playerid, COLOR_WHITE, "Vocк Pode atirar do Heli agora.");
return 1;
}
if(strcmp("/tirabase", cmdtext, true, 10) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !IsPlayerInVehicle(playerid, heli))
return SendClientMessage(playerid, -1, " Vocк precisa estar dentro do heli !");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(Z > 30.4057)
return PutPlayerInVehicle(playerid, heli, 0);
AttachObjectToVehicle(base, 0, -1.350097, -0.400024, -0.500000, 270.0, 180.0, 180.0);
return 1;
}