25.03.2014, 12:29
I see in many servers that you can enter bussines/pd/hospital/etc. by pressing " y "
how can i do it?
how can i do it?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_YES)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, /*Coordinate1*/, /*Coordinate2*/, /*Coordinate3*/)
{
//Stuff here
}
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_YES)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, float:x, float:y, float:z) // gets if the player is close to the point you want him to enter.. if he is.. then if he press KEY_YES he will be teleported on the pos you will set
{
SetPlayerPos(playerid,Float:x,Float:y,Float:z);
}
}
return 1;
}