30.08.2010, 14:58
hello how i can make when player will enter in a vehicle to writing "This vehicle is just for Admins" and auto eject....
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(IsPlayerAdmin(playerid) == 0) { SendClientMessage(playerid, RED, "Error: This Vehicle Is Only For Admins."); RemovePlayerFromVehicle(playerid); } return 1; }
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == VEHICLEID_WHO_YOU_WANT)
{
SendClientMessage(playerid, 0xFFFFFFFF, "This Vehicle is restrict for admins, get out!");
RemovePlayerFromVehicle(playerid);
return 1;
}
return 1
}
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(IsPlayerAdmin(playerid) == 0) { SendClientMessage(playerid, RED, "Error: This Vehicle Is Only For Admins."); SetPlayerHealth(playerid, 0); } return 1; } |
OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsPlayerAdmin(playerid) == 0)
{
SendClientMessage(playerid, RED, "Error: This Vehicle Is Only For Admins.");
SetPlayerHealth(playerid, 0);
}
else
{
SendClientMessage(playerid,RED,"Welcome admin!");
}
pawn Код:
https://sampwiki.blast.hk/wiki/OnPlayerStateChange |
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(IsPlayerAdmin(playerid) == 0) { SendClientMessage(playerid, RED, "Error: This Vehicle Is Only For Admins."); RemovePlayerFromVehicle(playerid); } return 1; } |
if(IsPlayerAdmin(playerid) == 0) |
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == VEHICLEID_WHO_YOU_WANT) { SendClientMessage(playerid, 0xFFFFFFFF, "This Vehicle is restrict for admins, get out!"); RemovePlayerFromVehicle(playerid); return 1; } return 1 }
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == VEHICLEID_WHO_YOU_WANT) { SendClientMessage(playerid, 0xFFFFFFFF, "This Vehicle is restrict for admins, get out!"); RemovePlayerFromVehicle(playerid); return 1; } return 1 } |
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == VEHICLEID_WHO_YOU_WANT)
{
if(IsPlayerAdmin(playerid)) return 1;
SendClientMessage(playerid, 0xFFFFFFFF, "This Vehicle is restrict for admins, get out!");
RemovePlayerFromVehicle(playerid);
}
return 1
}