is it possable?
#1

is it possable to make the hydra rcon only? so if your logged into rcon it lets you stay inside it and if your not then you cant stay inside.


if so can somebody help i got a rough idea but ive been searching on ******,sampforums everrywwhere and cant find anything the only thing i found was name only vehicles but i want rcon.




thx
Reply
#2

Here is how i'd do it.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(!IsPlayerAdmin(playerid) && GetVehicleModel(vehicleid) == 520)
        SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
       
    return 1;
}
Reply
#3

IsPlayerAdmin ?

Peace...
Reply
#4

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Here is how i'd do it.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(!IsPlayerAdmin(playerid) && GetVehicleModel(vehicleid) == 520)
        SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
       
    return 1;
}
thanks 1 error tho

Код:
C:\Users\Stephen-Laptop\Desktop\server samp - Copy\gamemodes\lvpg.pwn(459) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.

edit where in that code do i put if your not the rcon admin it says "your not allowed to use this!"
Reply
#5

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(!IsPlayerAdmin(forplayerid) && GetVehicleModel(vehicleid) == 520)
        SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
       
    return 1;
}
Reply
#6

Its forplayerid not playerid.

EDIT: this is another method like what you want.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!IsPlayerAdmin(playerid) && GetVehicleModel(vehicleid) == 520)
    {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, 0xff0000FF, "You are not admin.");
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Its forplayerid not playerid.
... mk still confused



and the other code complied and it wouldnt let me in atall



ugh i knew this was hard >_<
Reply
#8

bump please hellp:P
Reply
#9

I changed the code a little it should work if not sorry.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(GetVehicleModel(vehicleid) == 520)
    {
        if(!IsPlayerAdmin(playerid))
        {
            SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
            SendClientMessage(playerid, 0xff0000FF, "Only admin can fly hydra's");
        }
    }
    return 1;
}
Reply
#10

The above code will send a message once the vehicle is streamed in, which would send the same message multiple times, once every time the player enters the area for the vehicle to be streamed. This can be done by simply removing the player from the vehicle upon entrance:
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
   if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 520 && !IsPlayerAdmin( playerid ) )
   {
      SendClientMessage( playerid, 0xFF0000FF, "Only admins can fly hydra's" );
      RemovePlayerFromVehicle( playerid );
   }
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)