IsPlayerInAnyVehicle... (ZCMD)
#1

Hi Scripterzzz!

There are no errors. The problem is IsPlayerInAnyVehicle(I think). When i type /avtomobil in UnOwnable car i get Server:UNKNOWN MESSAGE ( I want to get a message "This is not you're car" )...

Код:
	CMD:avto(playerid, params[]) return cmd_avtomobil(playerid, params);
	CMD:avtomobil(playerid, params[])
	{
		new ime[MAX_PLAYER_NAME];
		GetPlayerName(playerid,ime,sizeof(ime));
		new i;
		new vehicleid = GetPlayerVehicleID(playerid);
  		i = ConvertVehIDtoDYID(vehicleid);
    	new vozac = GetPlayerState(playerid); // Get the killer's state

 		if(IsPlayerInAnyVehicle(playerid))
   		{
			if(strmatch(MyVehicle[i][MyVehOwner], ime))
   	  		{
				ShowPlayerDialog(playerid, CMDAvto, DIALOG_STYLE_LIST, "Tomato Avtomobil Kontrola", "-> Otkluci/Zakluci avtomobil\n-> Parkiraj\n-> Pronajdi avtomobil\n-> Prodadi avtomobil\n-> Prodadi avtomobil na igrac", "OK", "Otkazi");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ova vozilo ne e vase");
			    return 1;
			}
		}
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)