05.11.2009, 17:05
ive got a gangzone , but how can i make it so when you enter it a message appears?
Originally Posted by Ritchie999
i tried doing it using "strcmp" and "IsPlayerInArea" but it doesnt come up automatically, you have to type the command to see the message, and even so, you can still type it even if you are outside the area.. no one told me yet how to use a timer and loop
|
//Somewhere in your script stock IsPlayerInArea(playerid,Float:minX,Float:minY,Float:maxX,Float:maxY) { new Float:pX,Float:pY,Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); if(pX >= minX && pX <= maxX && pY >= minY && pY <= maxY) return 1; else return 0; } //OnPlayerUpdate public OnPlayerUpdate(playerid) { if(IsPlayerInArea(playerid,-210.2018, 1599.869, 548.8602, 2312.219)) //Same coords as your gangzone { GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Location Gangzone", 3000, 3); } return 1; }