I have no idea how to solve this! :( -
JEkvall95 - 29.11.2012
Yep here is a GPS system
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?
Re: I have no idea how to solve this! :( -
[D]ry[D]esert - 29.11.2012
https://sampwiki.blast.hk/wiki/GameTextStyle#Text_Styles
Re: I have no idea how to solve this! :( -
ViniBorn - 29.11.2012
TextDraw
Re: I have no idea how to solve this! :( -
JEkvall95 - 29.11.2012
Doesn't help :S
Re: I have no idea how to solve this! :( -
kaisersouse - 29.11.2012
Quote:
Originally Posted by Viniborn
TextDraw
|
No he's right...those are GameText and not TextDraws
EDIT actually...the FIRST ss in the OPs post is a GameText, the one he wants to change it to seems to be a TextDraw
Re: I have no idea how to solve this! :( -
JEkvall95 - 30.11.2012
how to change that?
I have no idea :/
Re: I have no idea how to solve this! :( -
JEkvall95 - 01.12.2012
someone?
Re: I have no idea how to solve this! :( -
maramizo - 01.12.2012
On top of the script:
pawn Код:
new PlayerText:Textdraw0;
pawn Код:
forward update_zones();
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)
{
CreateTDZ(i, zones[j][zone_name]);
}
else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0)
{
CreateTDZ(i, zones[j][zone_name]);
}
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;
}
}
}
}
forward HidePlayerTextDraw(i);
public HidePlayerTextDraw(i)
{
PlayerTextDrawHide(i, Textdraw0);
PlayerTextDrawDestroy(i, Textdraw0);
return 1;
}
CreateTDZ(i, z)
{
new str[50];
format(str, 50, "%s", z);
Textdraw0 = CreatePlayerTextDraw(playerid,500.000000, 350.000000, str);
PlayerTextDrawAlignment(playerid,Textdraw0, 3);
PlayerTextDrawBackgroundColor(playerid,Textdraw0, 255);
PlayerTextDrawFont(playerid,Textdraw0, 0);
PlayerTextDrawLetterSize(playerid,Textdraw0, 0.879999, 2.499999);
PlayerTextDrawColor(playerid,Textdraw0, -1);
PlayerTextDrawSetOutline(playerid,Textdraw0, 0);
PlayerTextDrawSetProportional(playerid,Textdraw0, 1);
PlayerTextDrawSetShadow(playerid,Textdraw0, 1);
PlayerTextDrawSetSelectable(playerid,Textdraw0, 0);
PlayerTextDrawShow(playerid, Textdraw0);
SetTimerEx("HidePlayerTextDraw", 1500, 0, "i", playerid);
}
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;
}
Re: I have no idea how to solve this! :( -
JEkvall95 - 02.12.2012
It is not a fs, it is in a gamemode, I got 12 errors
pawn Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2364) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2365) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2366) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2367) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2368) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2369) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2370) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2371) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2372) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2373) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2374) : error 017: undefined symbol "playerid"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc19952.pwn(2375) : error 017: undefined symbol "playerid"
Re: I have no idea how to solve this! :( -
maramizo - 02.12.2012
pawn Код:
forward update_zones();
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)
{
CreateTDZ(i, zones[j][zone_name]);
}
else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0)
{
CreateTDZ(i, zones[j][zone_name]);
}
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;
}
}
}
}
forward HidePlayerTextDraw(i);
public HidePlayerTextDraw(i)
{
PlayerTextDrawHide(i, Textdraw0);
PlayerTextDrawDestroy(i, Textdraw0);
return 1;
}
CreateTDZ(i, z)
{
new str[50];
format(str, 50, "%s", z);
Textdraw0 = CreatePlayerTextDraw(i,500.000000, 350.000000, str);
PlayerTextDrawAlignment(i,Textdraw0, 3);
PlayerTextDrawBackgroundColor(i,Textdraw0, 255);
PlayerTextDrawFont(i,Textdraw0, 0);
PlayerTextDrawLetterSize(i,Textdraw0, 0.879999, 2.499999);
PlayerTextDrawColor(i,Textdraw0, -1);
PlayerTextDrawSetOutline(i,Textdraw0, 0);
PlayerTextDrawSetProportional(i,Textdraw0, 1);
PlayerTextDrawSetShadow(i,Textdraw0, 1);
PlayerTextDrawSetSelectable(i,Textdraw0, 0);
PlayerTextDrawShow(i, Textdraw0);
SetTimerEx("HidePlayerTextDraw", 1500, 0, "i", i);
}
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;
}
Here you go.