29.11.2012, 21:06
Yep here is a GPS system
Uploaded with ImageShack.us
BUT How do I change the textdraw to this one?
pawn Код:
public update_zones() {
new
line1[10],
line2[10];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && zoneupdates[i] == 1) {
if(IsPlayerInZone(i,player_zone[i])) {
}
else {
new
player_zone_before;
player_zone_before = player_zone[i];
player_zone[i] = -1;
for(new j=0; j<sizeof(zones);j++) {
if(IsPlayerInZone(i,j) && player_zone[i] == -1) {
if(player_zone_before == -1) GameTextForPlayer(i,zones[j][zone_name],1500,4);
else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,4);
player_zone[i] = j;
format(line1,10,"p%dzone",i);
format(line2,10,"%d",j);
}
}
if(player_zone[i] == -1) player_zone[i] = player_zone_before;
}
}
}
}
IsPlayerInZone(playerid, zoneid) {
if(zoneid == -1) return 0;
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= zones[zoneid][zone_minx] && x < zones[zoneid][zone_maxx]
&& y >= zones[zoneid][zone_miny] && y < zones[zoneid][zone_maxy]
&& z >= zones[zoneid][zone_minz] && z < zones[zoneid][zone_maxz]
&& z < 900.0) return 1;
return 0;
}
Uploaded with ImageShack.us
BUT How do I change the textdraw to this one?