Block the command if...
#1

This command is respawning a ownable car (only if the car is not in use). I wan't it should send a message if someone is driving the car.. "You vehicle is in use try it later" anyone has idea ?

Quote:

if(strcmp(cmd, "/tc3", true) == 0 || strcmp(cmd, "/tv3", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
new keycar = PlayerInfo[playerid][pPcarkey3];
if(keycar != 255)
{
if(!unwanted[keycar]) SetVehicleToRespawn(keycar);
}
SendClientMessage(playerid, COLOR_WHITE, "Vehicle respawned");
}
return 1;
}

Reply


Messages In This Thread
Block the command if... - by ArTisT - 28.04.2010, 18:22
Re: Block the command if... - by MadeMan - 28.04.2010, 18:26
Re: Block the command if... - by ArTisT - 28.04.2010, 18:32
Re: Block the command if... - by ArTisT - 28.04.2010, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)