Need Scripts :|
#1

hi i need a script, its work :
slap passengner after 5s if ther is no driver on car , its mean players cant use guns with G , if the car have no driver it should kick the passenger [who pressed G] and send this text on chat just for that player :
* There is no Driver in This Car ! Use F .

thnx guys :@ i realy need some scripts for my gamemode a scripter was make that but cant continue and i cant write scripts hope you can help me !

srry for my bad english :[
Reply
#2

The first part is the "checker":

Код:
forward TimerSlap(playerid);
public TimerSlap(playerid)
{
	if(GetPlayerVehicleSeat(playerid) > 0)//If the player is a passenger
	{
		for(new i = 0; i < MAX_PLAYERS; i++) //Loops through all players
	    		if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) 
				return 1;


		//If did not found the driver, the passenger get slapped
		RemovePlayerFromVehicle(playerid);//Removing player from vehicle
		SendClientMessage(playerid, -1, "* There is no Driver in This Car ! Use F . ");
	}
}
You can use this code as a infinite timer and start it when OnGameModeInit get called.

The other way is: the "checker" get called only when the driver got out of the car or when anyother player enter in a vehicle.
Reply
#3

hm... i am a little newbie on samp scripting , can you compile it as a FS ? i just paste this codes and compiled it , not worked , i cant understand anything from your tips , if is it possible just compile it as a filterscript
Reply
#4

Are you including zcmd in your gamemode?
Reply
#5

nope! i checked that and i cant find #include <zcmd> , you mean that , right ?
Reply
#6

Sorry, my last message was posted on the wrong thread:

https://pastebin.com/J8beGC2B
Reply
#7

thnx , but its has two problems , i want to its get slap , i mean change player Height (Z) shoot him up ! and turn off the car engine / lights and ... but i think if you replace this get off with slap i think it should be ok
Reply
#8

Change RemovePlayerFromVehicle to:

PHP код:
new Float:Pos[3];
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
SetPlayerPos(playeridPos[0], Pos[1], Pos[2]+5.0);

new 
enginelightsalarmdoorsbonnetbootobjective;
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
SetVehicleParamsEx(vehicleid00alarmdoorsbonnetbootobjective); 
Reply
#9

thnx !! its worked , i need some others scripts , can you answer on this topic ? i want to add a text on top of the screen , it should change (border) color , text : ExpGames , next to the hude , the gun preview
Reply
#10

This scripts you want gonna need more atention. I recommend you search a scripter to do what you want or check this page to you create it by yourself:

https://sampforum.blast.hk/showthread.php?tid=543002

If I were helpful on this thread, please, give +
Reply
#11

um, srry what is that + ? how should i give it to you :\ ? just place it on my reply or should do something else ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)