Help with /fixveh
#10

Код:
	if(strcmp(cmd, "/fixveh", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] <=4)
			{
				SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !"); return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fixveh [PlayerID/PartOfName]");
			}
			new playa;
			playa = ReturnUser(tmp);
			if(IsPlayerInAnyVehicle(playa))
			{
				new vid = GetPlayerVehicleID(playa);
				SetVehicleHealth(vid, 1000.0);
				RepairVehicle(GetPlayerVehicleID(playa));
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* Admin %s has fixed your vehicle.", sendername);
				SendClientMessage(playa, COLOR_GREY, string);
			}
			else
			{
				format(string, sizeof(string),"I know you could fix cars, but since when can you fix players? %s isn't in a car. -Alex", PlayerName(giveplayerid));
				SendClientMessage(playerid, COLOR_GREY, string);
			}
			return 1;
		}
	}
There. I just fixed mine today, that should work perfectly fine.
Reply


Messages In This Thread
Help with /fixveh - by KevinPRINCE - 20.10.2012, 13:13
Re: Help with /fixveh - by M3mPHi$_S3 - 20.10.2012, 13:18
Re: Help with /fixveh - by Faisal_khan - 20.10.2012, 13:27
Re: Help with /fixveh - by KevinPRINCE - 20.10.2012, 13:34
Re: Help with /fixveh - by thefatshizms - 20.10.2012, 13:37
Re: Help with /fixveh - by Faisal_khan - 20.10.2012, 13:41
Re: Help with /fixveh - by _Khaled_ - 20.10.2012, 13:41
Re: Help with /fixveh - by Patrick - 20.10.2012, 13:42
Re: Help with /fixveh - by Faisal_khan - 20.10.2012, 13:44
Re: Help with /fixveh - by InActtive™ - 24.12.2012, 17:16

Forum Jump:


Users browsing this thread: 1 Guest(s)