SetPlayerArmedWeapon SetPlayerArmedWeapon + IsPlayerInAnyVehicle |
if(IsPlayerInAnyVehicle(playerid)) {
SetPlayerArmedWeapon(playerid, 0);
}
Nгo entendi muito bem, mas acho que й isso.
PHP код:
|
CMD:drift1(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid)) {
SetPlayerArmedWeapon(playerid, 0);
}
if(IsPlayerOnHeli(playerid)) return SendClientMessage(playerid,Vermelho,"[Info]: You can not Teleport with Helicopter !");
if(IsPlayerOnPlane(playerid)) return SendClientMessage(playerid,Vermelho,"[Info]: You can not Teleport with Plane !");
if(IsPlayerInBoat(playerid)) return SendClientMessage(playerid,Vermelho,"[Info]: You can not Teleport with Boat !");
if(IsPlayerOnRC(playerid)) return SendClientMessage(playerid,Vermelho,"[Info]: You can not Teleport with RC Vehicle !");
if(Duel[playerid] >=1) return SendClientMessage(playerid,Vermelho,"[Error]:You can Not use Commands if you are in a Duel !");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "[Info]: You do not have Vehicle");
GetPlayerName(playerid, Pnome1, MAX_PLAYER_NAME);
format(Stg, sizeof(Stg), "{5500FF}%s -{FFFFFF} Was for the Drift 1 :{F6FF00} (/DRIFT1)", Pnome1);
SendClientMessageToAll(0x00F400AA, Stg);
SetPlayerPos(playerid,-355.8477,1531.5792,75.3594);
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, -355.8477,1531.5792,75.3594);
LinkVehicleToInterior(veh, 0);
SetVehicleZAngle(veh, 0.0);
PutPlayerInVehicle(playerid, veh, 0);
return 1;
}