23.01.2010, 22:54
Hey, I'm trying to make a system so only one guy with the name Tinus, or VonLeeuwen can enter it.
This is my script, but simply nothing happens when we enter.
Thanks for helping.
This is my script, but simply nothing happens when we enter.
Код:
new sandkingtinus; new sandkingvon;
Код:
sandkingtinus = AddStaticVehicle(495,-696.6309,946.5757,12.6335,3.4700,114,108); // sandking VonLeeuwen sandkingvon = AddStaticVehicle(495,-78.6387,947.1689,12.4842,358.8175,114,108); // sandking Tinus
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); new vehicle; vehicle = GetPlayerVehicleID(playerid); if(vehicle == sandkingtinus) { if(!strcmp(name, "tinus", false, 0)) { SendClientMessage(playerid, cyan, "Sorry, this car is reserved for Tinus."); } } if(vehicle == sandkingvon) { if(!strcmp(name,"vonleeuwen",false, 0)) { SendClientMessage(playerid,cyan,"Sorry, this car is reserved for VonLeeuwen."); } } return 1; }