06.11.2010, 12:29
How can i make a /nos command?
CMD:nos(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle, 1010);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You must be in a vehicle to use this command.");
}
return 1;
}
CMD:nos(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
else return SendClientMessage(playerid, 0xFFFFFFFF, "You must be in a vehicle to use this command.");
}
CMD:nos(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid); return SendClientMessage(playerid,red,"You must be in a vehicle to add nos to it!");
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle, 1010);
return 1;
}