15.05.2012, 06:21
1) I can't enter all the vehicles
2) I'm Los Santos gang member. But I can see a message says "[WARNING]You have entered San Fierro Area". But I'm at Los Santos.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new veh = GetPlayerVehicleID(playerid);
new score = GetPlayerScore(playerid);
new Float:x,Float:y,Float:z;
if(veh == 520 && score < 350)
{
SendClientMessage(playerid,0xFF0000FF,"You need to be at least Level 4 to use this vehicle");
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z);
RemovePlayerFromVehicle(playerid);
return 1;
}
else if(veh == 425 && score < 600)
{
SendClientMessage(playerid,0xFF0000FF,"You need to be Level 5 to use this vehicle");
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z);
RemovePlayerFromVehicle(playerid);
return 1;
}
else if(veh == 447 && veh == 432 || score < 150)
{
SendClientMessage(playerid,0xFF0000FF,"You need to be at least Level 3 to use this vehicle");
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z);
RemovePlayerFromVehicle(playerid);
return 1;
}
else if(veh == 476 && score < 50)
{
SendClientMessage(playerid,0xFF0000FF,"You need to be at least Level 2 to use this vehicle");
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z);
RemovePlayerFromVehicle(playerid);
return 1;
}
return 1;
}
pawn Код:
public OnPlayerEnterArea(playerid, areaid)
{
new gang = GetPlayerTeam(playerid);
if(areaid == lsarea && gang == Las_Venturas_Gang_Members && gang == San_Fierro_Gang_Members)
{
SendClientMessage(playerid,0xFF0000FF,"[WARNING]You have entered Los Santos Area");
return 1;
}
else if(areaid == sfarea || gang == Las_Venturas_Gang_Members || gang == Los_Santos_Gang_Members)
{
SendClientMessage(playerid,0xFF0000FF,"[WARNING]You have entered San Fierro Area");
return 1;
}
else if(areaid == lvarea || gang == San_Fierro_Gang_Members || gang == Los_Santos_Gang_Members)
{
SendClientMessage(playerid,0xFF0000FF,"[WARNING]You have entered Las Venturas Area");
return 1;
}
return 1;
}