Need Scripts :| -
PoniStar - 02.09.2018
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 :[
Re: Need Scripts :| -
iHollyZinhO - 02.09.2018
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.
Re: Need Scripts :| -
PoniStar - 02.09.2018
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
Re: Need Scripts :| -
iHollyZinhO - 02.09.2018
Are you including zcmd in your gamemode?
Re: Need Scripts :| -
PoniStar - 02.09.2018
nope! i checked that and i cant find #include <zcmd> , you mean that , right ?
Re: Need Scripts :| -
iHollyZinhO - 02.09.2018
Sorry, my last message was posted on the wrong thread:
https://pastebin.com/J8beGC2B
Re: Need Scripts :| -
PoniStar - 02.09.2018
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
Re: Need Scripts :| -
iHollyZinhO - 02.09.2018
Change
RemovePlayerFromVehicle to:
PHP код:
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+5.0);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);
Re: Need Scripts :| -
PoniStar - 02.09.2018
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
Re: Need Scripts :| -
iHollyZinhO - 02.09.2018
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 +
Re: Need Scripts :| -
PoniStar - 02.09.2018
um, srry what is that + ? how should i give it to you :\ ? just place it on my reply or should do something else ?