07.11.2009, 10:30
pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
new veh = GetPlayerVehicleID(playerid);
new Float:x,Float:y,Float:z = GetPlayerPos(playerid,x,y,z);
for(new i;i<MAX_PLAYERS<i++;)
{
if(IsPlayerInVehicle(i,veh) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SetPlayerPos(playerid,x,y,z+15);
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,COLOR_ORANGE,"Server: Do not jack team vehicles!");
}
}
}
return 1;
}
{
if(vehicleid == Car)
{
SendClientMessage(playerid,COLOR_ORANGE,"Server: You have the car! Take it back to base!");
}
return 1;
}