On Player Enter Vehicle -
MadnessJohnson - 08.10.2008
Ok i think iv done this b4, but forgot how, got a idea how but not entiely sure,
how cud i under OnPlayerEnterVehicle have
like if your name isnt [LSB]Johnson you get ejected from the car? I know its realy simple but completely forgot, also the name of the car is jsay ..
ty , J
Re: On Player Enter Vehicle -
Rks25 - 08.10.2008
pawn Код:
new mycar;
//@Ongamemodeinit
mycar = CreateVehicle(..
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == mycar)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(strcmp(PlayerName, "[LSB]Johnson", true) == 0)
{
SendClientMessage(playerid, COLOR_COLOR,"This is your car.");
}
else
{
SendClientMessage(playerid, COLOR_COLOR, "This car is reserved for [LSB]Johnson!");
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Untested.
Re: On Player Enter Vehicle -
JoeDaDude - 08.10.2008
This is actually quite simple, I would give you an code but it so happens that if i do
i will be giving away my private car script, And i will be breaking many rules.
Re: On Player Enter Vehicle -
MadnessJohnson - 08.10.2008
Quote:
Originally Posted by Rksss
pawn Код:
new mycar;
//@Ongamemodeinit mycar = CreateVehicle(..
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == mycar) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName, "[LSB]Johnson", true) == 0) { SendClientMessage(playerid, COLOR_COLOR,"This is your car."); } else { SendClientMessage(playerid, COLOR_COLOR, "This car is reserved for [LSB]Johnson!"); RemovePlayerFromVehicle(playerid); } } return 1; }
Untested.
|
ty you for this g,
but i alredi got it from one of mi old gm's, but thankyou for your help
Johnson
Re: On Player Enter Vehicle -
Erkan - 08.10.2008
Quote:
Originally Posted by MadnessJohnson
Quote:
Originally Posted by Rksss
pawn Код:
new mycar;
//@Ongamemodeinit mycar = CreateVehicle(..
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == mycar) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName, "[LSB]Johnson", true) == 0) { SendClientMessage(playerid, COLOR_COLOR,"This is your car."); } else { SendClientMessage(playerid, COLOR_COLOR, "This car is reserved for [LSB]Johnson!"); RemovePlayerFromVehicle(playerid); } } return 1; }
Untested.
|
ty you for this g,
but i alredi got it from one of mi old gm's, but thankyou for your help
Johnson
|
Are you making this for Streetz ?
Or you make your own Server. :S
Re: On Player Enter Vehicle -
MadnessJohnson - 09.10.2008
Quote:
Originally Posted by [LSB
Erkan ]
Quote:
Originally Posted by MadnessJohnson
Quote:
Originally Posted by Rksss
pawn Код:
new mycar;
//@Ongamemodeinit mycar = CreateVehicle(..
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == mycar) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName, "[LSB]Johnson", true) == 0) { SendClientMessage(playerid, COLOR_COLOR,"This is your car."); } else { SendClientMessage(playerid, COLOR_COLOR, "This car is reserved for [LSB]Johnson!"); RemovePlayerFromVehicle(playerid); } } return 1; }
Untested.
|
ty you for this g,
but i alredi got it from one of mi old gm's, but thankyou for your help
Johnson
|
Are you making this for Streetz ?
Or you make your own Server. :S
|
for streetz, but fo games car ... why?
Re: On Player Enter Vehicle -
Backwardsman97 - 10.10.2008
This won't work I don't think. You need to have it under OnPlayerStateChange because OnPlayerEnterVehicle is called when the player hits enter near a vehicle. They could easily stop walking towards it. So they could hit enter and cancel it and receive this message. OnPlayerStateChange is only called once they are in the car and it is on.
Re: On Player Enter Vehicle -
mamorunl - 10.10.2008
Quote:
Originally Posted by Rksss
pawn Код:
new mycar;
//@Ongamemodeinit mycar = CreateVehicle(..
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == mycar) { new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(strcmp(PlayerName, "[LSB]Johnson", true) == 0) { SendClientMessage(playerid, COLOR_COLOR,"This is your car."); } else { SendClientMessage(playerid, COLOR_COLOR, "This car is reserved for [LSB]Johnson!"); RemovePlayerFromVehicle(playerid); } } return 1; }
Untested.
|
1. pastebin
2. you cant remove a player from a vehicle if he isn't in one.
3. You are offering scripts and yourself as a scripter but you don't know this? shame on you
Re: On Player Enter Vehicle -
Cueball - 10.10.2008
Quote:
Originally Posted by [NT
SpeedDevil ]
3. You are offering scripts and yourself as a scripter but you don't know this? shame on you
|
LOL pwnt. That wasn't nice though, so you earn -2.4 Cuenits. Please be nicer next time, expecially to somebody as holy as Rksss.
~Cueball~
Re: On Player Enter Vehicle -
mamorunl - 10.10.2008
Quote:
Originally Posted by Cueball
Quote:
Originally Posted by [NT
SpeedDevil ]
3. You are offering scripts and yourself as a scripter but you don't know this? shame on you
|
LOL pwnt. That wasn't nice though, so you earn -2.4 Cuenits. Please be nicer next time, expecially to somebody as holy as Rksss.
~Cueball~
|
now I only have 1.6 cuenits left
Rks holy? please explain yourself... no really!