27.05.2014, 15:30
Hello.
I'm trying to create a command that will be created vehicle called the player and only he could enter it. The problem is that I can not enter the vehicle created.
code :
Sorry for my bad english :P
I'm trying to create a command that will be created vehicle called the player and only he could enter it. The problem is that I can not enter the vehicle created.
code :
Код:
// on top of a map new Player[MAX_PLAYERS]; // command : CMD:v(playerid, params[]) { if(vInfo[playerid][VMODEL] != 0 && vZespawnowany[playerid] == 0) { Player[playerid] = CreateVehicle(vInfo[playerid][VMODEL], vInfo[playerid][VPX], vInfo[playerid][VPY], vInfo[playerid][VPZ], vInfo[playerid][VOBROT], vInfo[playerid][VCOLOR2], vInfo[playerid][VCOLOR2], 600); SendClientMessage(playerid,COLOR_YELLOW,"Zespawnowałeś swуj pojazd !"); vZespawnowany[playerid] = 1; } else if(vZespawnowany[playerid] == 1) { SendClientMessage(playerid,COLOR_RED,"Twуj pojazd jest już zespawnowany !"); } else if(vInfo[playerid][VMODEL] == 0) { SendClientMessage(playerid,COLOR_RED,"Nie masz pojazdu !"); } return 1; } // function for the player ejected from the vehicle : if(GetPlayerVehicleID(playerid) != uauto1 || GetPlayerVehicleID(playerid) != uauto2 || GetPlayerVehicleID(playerid) != uauto3 || GetPlayerVehicleID(playerid) != uauto4) { if(GetPlayerVehicleID(playerid) != Player[MAX_PLAYER_NAME]) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "To nie twуj pojazd , wysiadaj"); } else if(GetPlayerVehicleID(playerid) == Player[MAX_PLAYER_NAME]) { } }