Specific vehicle
#1

Hello

I am trying to do something like only admins can get into vehicle id 432 and if players go in get slapped.I did this and its not working
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid) {
    for(new x=0; x<MAX_PLAYERS; x++) {
        if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid) {
            TogglePlayerSpectating(x, 1);
            PlayerSpectateVehicle(x, vehicleid);
            PlayerInfo[x][SpecType] = ADMIN_SPEC_TYPE_VEHICLE;
        }
    }
   
     if(PlayerInfo[playerid][Level] >= 0)
     {
    if(vehicleid == ANTIVEH)
    {
        SendClientMessage(playerid, COLOR_GREEN, "balnh.");
        new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(playerid,Health); SetPlayerHealth(playerid,Health-25);
        GetPlayerPos(playerid,x,y,z); SetPlayerPos(playerid,x,y,z+5); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
     }
  }
    return 1;
}
Код:
#define ANTIVEH 432
Reply


Messages In This Thread
Specific vehicle - by Black Wolf - 23.09.2012, 04:43
Re: Specific vehicle - by Psymetrix - 23.09.2012, 04:49
Re: Specific vehicle - by Black Wolf - 23.09.2012, 04:54
Re: Specific vehicle - by Danyal - 23.09.2012, 04:58
Re: Specific vehicle - by Psymetrix - 23.09.2012, 05:03
Re: Specific vehicle - by Black Wolf - 23.09.2012, 05:04
Re: Specific vehicle - by Danyal - 23.09.2012, 05:12
Re: Specific vehicle - by Black Wolf - 23.09.2012, 05:15
Re: Specific vehicle - by Danyal - 23.09.2012, 05:16
Re: Specific vehicle - by Psymetrix - 23.09.2012, 05:16

Forum Jump:


Users browsing this thread: 1 Guest(s)