Scripting help :D for vehicle permissions -
john77 - 27.05.2013
Hey guys I just need help with a scripting, I am what you would call a n00b but I am still learning.
Okay so I want to have a script that kicks players out of the car when “players” get in specific vehicles just players not admins the specific vehicles are
Hydra
Hunter
Sea sparrow
And can there be a message saying this is a admin vehicle or military.
For every helpful comment I will give REP’s
THANKS
Re: Scripting help :D for vehicle permissions -
mahdi499 - 27.05.2013
You can find this in tutorials,and Optimize your code As you like,it's explained.
Re: Scripting help :D for vehicle permissions -
john77 - 27.05.2013
you made it sooo good you got a copy?
Re: Scripting help :D for vehicle permissions -
mahdi499 - 27.05.2013
pawn Code:
new Hydras[30];
IsAHydra(carid)
{
for(new v = 0; v < sizeof(Hydras); v++)
{
if(carid == Hydras[v]) return 1;
}
return 0;
}
OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsAHydra(vehicleid))
{
if(IsPlayerAdmin(playerid))
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
SendClientMessage(playerid, -1, "You can't enter Hydras");
return 1;
}
}
return 1;
}
don't forget to add Hydras[number] = before each hydra
Re: Scripting help :D for vehicle permissions -
john77 - 27.05.2013
I saved this 100 times lol, hydra numbers? :/
Re: Scripting help :D for vehicle permissions -
mahdi499 - 27.05.2013
The Hydras[number] =
You replace number by 0,1,2,3,4 you know
Re: Scripting help :D for vehicle permissions -
john77 - 27.05.2013
:/ 0 1 2 3 4? What is this for? and where to replace, here? new Hydras[30];
Re: Scripting help :D for vehicle permissions -
mahdi499 - 27.05.2013
No,i said Place Behinde Each Hydra you spawned This Hydras[1] = and Hydras[2] = Like this for each hydra
Re: Scripting help :D for vehicle permissions -
john77 - 27.05.2013
But I don't know how many hydra's are there? can I have any and every hydra
Re: Scripting help :D for vehicle permissions -
[..MonTaNa..] - 27.05.2013
Do you want so only admins can use hydra ?