SA-MP Forums Archive
Help plz for script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help plz for script (/showthread.php?tid=96021)



Help plz for script - alban46000 - 05.09.2009

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


Re: Help plz for script - Eazy_Efolife - 06.09.2009

double post?

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

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


Re: Help plz for script - alban46000 - 06.09.2009

Yes sorry


Re: Help plz for script - Eazy_Efolife - 06.09.2009

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


Re: Help plz for script - alban46000 - 06.09.2009

Thank you so much


Re: Help plz for script - Eazy_Efolife - 06.09.2009

No Problem :P


Re: Help plz for script - alban46000 - 06.09.2009

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


Re: Help plz for script - alban46000 - 06.09.2009

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 ... )


Re: Help plz for script - Eazy_Efolife - 06.09.2009

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


Re: Help plz for script - alban46000 - 06.09.2009

ok