21.04.2012, 16:18
Hi guys.
Here, I tried to make an area where the player can exit his vehicle.
Here's the script:
The problem is that it makes me always the message, and it never comes in the "else"
Here is a screenshot of where I took the positions.
http://imageshack.us/photo/my-images/151/samp000vh.png/
http://imageshack.us/photo/my-images...amp001ary.png/
Here, I tried to make an area where the player can exit his vehicle.
Here's the script:
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(PlayerInfo[playerid][pWorld] == 3)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if(GetPlayerTeam(playerid) == 1) // Rouges
{
if (x <= 436.3784 && x >= -81.0595)
{
SendClientMessage(playerid,COLOR_GREY,"Test");
}
else
{
return false;
}
}
if(GetPlayerTeam(playerid) == 2) // Verts
{
}
}
return 1;
}
Here is a screenshot of where I took the positions.
Quote:
436.3784,2528.7734,17.0038 |
Quote:
-81.0595,2476.4946,16.4844 |