01.02.2010, 18:46
Hey,
I created some beds in my script, and when a player is on the bed, it should say 'Bed 1: *name*' or 'Bed 2: *name' etc.
I already made this:
Under OnPlayerSpawn:
Bottom of script:
But the result is, nothing happens when I stand on the bed.
BTW: These are the coordinates:
What can I do to fix it?
I created some beds in my script, and when a player is on the bed, it should say 'Bed 1: *name*' or 'Bed 2: *name' etc.
I already made this:
Код:
forward IsPlayerInArea();
Код:
SetTimer("IsPlayerInArea", 1000, 1);
Код:
public IsPlayerInArea() { new Float:x,Float:y,Float:z; for(new i=0;i<MAX_PLAYERS;i++) { GetPlayerPos(i,x,y,z); if(x >= 238.6068 && x <= 240.6635 && y >= 2066.3640 && y <= 2068.2859 && z <=23.7469) //bed 1 { SendClientMessage(i,COLOR_RED,"Bed #1: Menace"); continue; } if(x >=238.5978 && x <=240.6654 && y >= 2063.0134 && y <= 2064.9238 && z <=23.7469) //bed 2 { SendClientMessage(i,COLOR_RED,"Bed #2: VonLeeuwen"); continue; } } return 1; }
BTW: These are the coordinates:
Код:
238.6068,2066.3640,17.6406 // bed1 1st corner 240.6635,2068.2859,17.6406 //bed1 2nd corner 238.5978,2063.0134,17.6406 // bed2 1st corner 240.6654,2064.9238,17.6406 // bed2 2nd corner