RBoy 3 Odesláno: 12. Duben, 2013 Share Odesláno: 12. Duben, 2013 Zdravím. Potreboval by som pomoc pri tomto skripte: - Nevypísalo mi to žiadne chyby, ale keď v hre vojdem do tej zóny, tak sa nič nestane... forward forward isPlayerInArea(); settimer SetTimer("isPlayerInArea", 1000, 1); ongamemodeinit public OnGameModeInit() { zona = GangZoneCreate(-3433.295, 1996.917, -2125.373, 3503.363); return 1; } onplayerspawn public OnPlayerSpawn(playerid) { GangZoneShowForPlayer(playerid, zone, 0x80FF0096); return 0; } isplayerinarea public isPlayerInArea() { new Float:X, Float:Y, Float:Z; for(new i=0; i < MAX_PLAYERS; i++) { GetPlayerPos(i, X, Y, Z); if (X <= -3433.295 && X >= 1996.917 && Y <= -2125.373 && Y >= 3503.363) { SetPlayerHealth(i, 100); SendClientMessage(i, TEXT); } } } Ďakujem Link to comment Share on other sites More sharing options...
0 ATomas 290 Odesláno: 29. Duben, 2013 Share Odesláno: 29. Duben, 2013 Myslim ze mas zrejme chybu v souradncich, over si: public isPlayerInArea() { new Float:X, Float:Y, Float:Z; for(new i=0; i < MAX_PLAYERS; i++) { GetPlayerPos(i, X, Y, Z); new s[128]; format(s,128,"%.f <= -3433.295 && %.f >= 1996.917 && %.f <= -2125.373 && %.f >= 3503.363",X,X,Y,Y); SendClientMessage(i,-1,s); if (X <= -3433.295 && X >= 1996.917 && Y <= -2125.373 && Y >= 3503.363) { SetPlayerHealth(i, 100); SendClientMessage(i, TEXT); } } } Link to comment Share on other sites More sharing options...
0 MrShoTys 9 Odesláno: 29. Duben, 2013 Share Odesláno: 29. Duben, 2013 http://pawno.cz/files/file/58-mapzonesmaker/ Link to comment Share on other sites More sharing options...
0 Piccaso 30 Odesláno: 30. Duben, 2013 Share Odesláno: 30. Duben, 2013 Tuto funkci musíš používat se správnými souřadnicemi, které vyhovují podmínkám ve stocku. Například nejdříve musíš ukládat pozici severovýchod a následně jihozápad, podle toho, jaké podmínky souřadnic máš v té funkci. Link to comment Share on other sites More sharing options...
Dotaz
RBoy 3
Zdravím.
Potreboval by som pomoc pri tomto skripte:
- Nevypísalo mi to žiadne chyby, ale keď v hre vojdem do tej zóny, tak sa nič nestane...
forward
settimer
ongamemodeinit
onplayerspawn
isplayerinarea
Ďakujem
Link to comment
Share on other sites
3 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now