05.03.2009, 17:25
Hey All!
I need a little help again..
I would like to change the gametext to textdraw but i dunno how to make it..
Here is the code:
(This is c-middia's location script)
I need change the GameTextForPlayer to TextDraw...
Please help me! Thx!
I need a little help again..
I would like to change the gametext to textdraw but i dunno how to make it..
Here is the code:
Код:
public update_zarea() { new line1[10]; new line2[10]; for(new i=0; i<MAX_PLAYERS_; i++) { if(IsPlayerConnected(i) && zareaupdates[i] == 1) { if(IsPlayerInzarea(i,player_zarea[i])) { } else { new player_zarea_before; player_zarea_before = player_zarea[i]; player_zarea[i] = -1; for(new j=0; j<sizeof(zarea);j++) { if(IsPlayerInzarea(i,j) && player_zarea[i] == -1) { if(player_zarea_before == -1) GameTextForPlayer(i,zarea[j][zarea_name],1500,5); //<- Change it to TextDraw else if(strcmp(zarea[j][zarea_name],zarea[player_zarea_before][zarea_name],true) != 0) GameTextForPlayer(i,zarea[j][zarea_name],1500,5); //<- Change it to TextDraw player_zarea[i] = j; format(line1,10,"p%dzarea",i); format(line2,10,"%d",j); PropertySet(line1,line2); } } if(player_zarea[i] == -1) player_zarea[i] = player_zarea_before; } } } } IsPlayerInzarea(playerid, zareaid) { if(zareaid == -1) return 0; new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); if(x >= zarea[zareaid][zarea_minx] && x < zarea[zareaid][zarea_maxx] && y >= zarea[zareaid][zarea_miny] && y < zarea[zareaid][zarea_maxy] && z >= zarea[zareaid][zarea_minz] && z < zarea[zareaid][zarea_maxz] && z < 900.0) return 1; return 0; } public update_zones() { new line1[10]; new 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,5); //<- Change it to TextDraw else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,5); //<- Change it to TextDraw player_zone[i] = j; format(line1,10,"p%dzone",i); format(line2,10,"%d",j); PropertySet(line1,line2); } } 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; }
I need change the GameTextForPlayer to TextDraw...
Please help me! Thx!