Help plz for script
#1

Hello , i search 2 scritps for rp server:

- One script for ejecter his passenger in a vehicule
- And one other for restrict vehicule has their team, and that no other player can use them ( The police vehicule is only for police-men )


Thanks
Reply
#2

double post?

http://forum.sa-mp.com/index.php?top...49.0;topicseen

http://forum.sa-mp.com/index.php?top...2914#msg742914
Reply
#3

Yes sorry
Reply
#4

Eject Code

Код:
if(strcmp(cmd, "/eject", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  	{
	    new State;
	    if(IsPlayerInAnyVehicle(playerid))
	    {
     		State=GetPlayerState(playerid);
		    if(State!=PLAYER_STATE_DRIVER)
		    {
		    	SendClientMessage(playerid,COLOR_GREY,"[ERROR:] You can only eject a user as the driver!");
		      return 1;
		    }
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /eject [playerid/PartOfName]");
					return 1;
				}
				new playa;
				playa = ReturnUser(tmp);
				new test;
				test = GetPlayerVehicleID(playerid);
				if(IsPlayerConnected(playa))
				{
				  if(playa != INVALID_PLAYER_ID)
				  {
				    if(playa == playerid) { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You can't eject yourself!"); return 1; }
				    if(IsPlayerInVehicle(playa,test))
				    {
							format(string, sizeof(string), "[INFO:] You have thrown out: %s.", GetPlayerNameEx(playa));
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "[INFO:] You have been thrown out of the car by: %s.", GetPlayerNameEx(playerid));
							SendClientMessage(playa, COLOR_WHITE, string);
							RemovePlayerFromVehicle(playa);
						}
						else
						{
						  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] That user is not even in your car!");
						  return 1;
						}
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Invalid ID.");
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You are not in a vehicle!");
			}
		}
		return 1;
	}
and the other one i cant help with you with cause i dont know your script
Reply
#5

Thank you so much
Reply
#6

No Problem :P
Reply
#7

I to search a script which allows during an impacte of the car to make ejec the player of the car. to make more real and the other in my topic
Reply
#8

anyone know this script ? -restrict vehicule has their team, and that no other player can use them ( The police vehicule is only for police-men !! Patriot is just for army ... )
Reply
#9

every RP script has that, Be More Specific, is it your own script? That You DIDN'T or a script you downloaded
Reply
#10

ok
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)