Death after vehicle delete
#1

Код:
    if(strcmp(cmd, "/deletevehicle", true) == 0 || strcmp(cmd, "/dv", true) == 0)
	{
		new veh = GetPlayerVehicleID(playerid);
		if(IsPlayerConnected(playerid))
	    {
			if(IsPlayerInAnyVehicle(playerid))
			{
				if(veh == PlayerVehicleID1[playerid])
				{
					ResetPlayerVehicle(playerid, 1);
					OnPlayerSave(playerid);
					format(string, sizeof(string), "Your vehicle have been deleted.");
					SendClientMessage(playerid, COLOR_YELLOW, string);
				}
				else if(veh == PlayerVehicleID2[playerid])
				{
					ResetPlayerVehicle(playerid, 2);
					OnPlayerSave(playerid);
					format(string, sizeof(string), "Your vehicle have been deleted.");
					SendClientMessage(playerid, COLOR_YELLOW, string);
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"	You are not in a vehicle that you own.");
				}
			}
			else
			{
				SendClientMessage(playerid,COLOR_GREY,"	You are not driving a vehicle.");
			}
		}
		return 1;
	}
When I use the command my vehicle gets removed but I also get killed? I'm sure it's very easy to solve but I didn't script for a long time and I was not a pro at it, so please help me! :P.
Reply


Messages In This Thread
Death after vehicle delete - by whando - 02.08.2013, 17:50
Respuesta: Death after vehicle delete - by Marricio - 02.08.2013, 18:08

Forum Jump:


Users browsing this thread: 1 Guest(s)