Skripta koju koristim: CLRP edit
Detaljan opis problema: Kada kucam /aon ili /gson nece da prikaze 3D text label iznad igraca...
Dio skripte: if(strcmp(cmd, "/aon", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerArmour(playerid, 1000.0);
SetPlayerHealth(playerid, 1000.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin {FFFFFF}%s {00C0FF}je sada na duznosti",sendername);
BroadCast(SVETLOPLAVA, string);
new Float:fa, Float:fy, Float:fu;
GetPlayerPos( playerid, fa, fy, fu );
playertextid = CreatePlayer3DTextLabel(playerid,"Admin na duznosti! (Ne Ometaj!)",SVETLOPLAVA,fa,fy,fu,40.0,INVALID_PLAYER_ID, playerid);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi admin!");
}
return 1;
}
if(strcmp(cmd, "/aoff", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerArmour(playerid, 0.0);
SetPlayerHealth(playerid, 100.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin {FFFFFF}%s {00C0FF}vise nije na duznosti!",sendername);
BroadCast(SVETLOPLAVA, string);
DeletePlayer3DTextLabel(playerid, playertextid);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi admin!");
}
return 1;
}
if(strcmp(cmd, "/gson", true) == 0)
{
if (PlayerInfo[playerid][pGameSage] >= 1)
{
SetPlayerArmour(playerid, 1000.0);
SetPlayerHealth(playerid, 1000.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "GameSage {FFFFFF}%s "COL_ZELENA"je sada na duznosti",sendername);
BroadCast(ZELENKASTA, string);
new Float:gfa, Float:gfy, Float:gfu;
GetPlayerPos( playerid, gfa, gfy, gfu );
playertextidgs = CreatePlayer3DTextLabel(playerid,"GameSage na duznosti! (Ne Ometaj!)",ZELENKASTA2,gfa,gfy,gfu,40.0,INVALID_PLAYER_ID, playerid);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi GameSage!");
}
return 1;
}
if(strcmp(cmd, "/gsoff", true) == 0)
{
if (PlayerInfo[playerid][pGameSage] >= 1)
{
SetPlayerArmour(playerid, 0.0);
SetPlayerHealth(playerid, 100.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "GameSage {FFFFFF}%s "COL_ZELENA"vise nije na duznosti!",sendername);
BroadCast(ZELENKASTA, string);
DeletePlayer3DTextLabel(playerid, playertextidgs);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi GameSage!");
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Ovo ti je funkcija da prikaciš 3D tekst na igraca kojeg ti želiš:
Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ) (http://wiki.sa-mp.com/wiki/Attach3DTextLabelToPlayer)
Text3D:id The 3D Text Label you want to attach.
playerid The player you want to attach the 3D Text Label to.
OffsetX The Offset-X coordinate of the player (the player is 0.0,0.0,0.0).
OffsetY The Offset-Y coordinate of the player (the player is 0.0,0.0,0.0).
OffsetZ The Offset-Z coordinate of the player (the player is 0.0,0.0,0.0).
Primer
Attach3DTextLabelToPlayer(textid, playerid, 0.0, 0.0, 0.0);
Gore umesto new Text3D:playertextidgs; stavis new Text3D:playertextidgs[MAX_PLAYERS];
I umesto new Text3D:playertextid; stavis new Text3D:playertextid[MAX_PLAYERS];
Komande:
if(strcmp(cmd, "/aon", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerArmour(playerid, 1000.0);
SetPlayerHealth(playerid, 1000.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin {FFFFFF}%s {00C0FF}je sada na duznosti",sendername);
BroadCast(SVETLOPLAVA, string);
new Float:fa, Float:fy, Float:fu;
GetPlayerPos( playerid, fa, fy, fu );
playertextid[playerid] = CreatePlayer3DTextLabel(playerid,"Admin na duznosti! (Ne Ometaj!)",SVETLOPLAVA,fa,fy,fu,40.0,INVALID_PLAYER_ID, playerid);
Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi admin!");
}
return 1;
}
if(strcmp(cmd, "/aoff", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerArmour(playerid, 0.0);
SetPlayerHealth(playerid, 100.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin {FFFFFF}%s {00C0FF}vise nije na duznosti!",sendername);
BroadCast(SVETLOPLAVA, string);
Delete3DTextLabel(playertextid[playerid]);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi admin!");
}
return 1;
}
if(strcmp(cmd, "/gson", true) == 0)
{
if (PlayerInfo[playerid][pGameSage] >= 1)
{
SetPlayerArmour(playerid, 1000.0);
SetPlayerHealth(playerid, 1000.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "GameSage {FFFFFF}%s "COL_ZELENA"je sada na duznosti",sendername);
BroadCast(ZELENKASTA, string);
new Float:gfa, Float:gfy, Float:gfu;
GetPlayerPos( playerid, gfa, gfy, gfu );
playertextidgs[playerid] = CreatePlayer3DTextLabel(playerid,"GameSage na duznosti! (Ne Ometaj!)",ZELENKASTA2,gfa,gfy,gfu,40.0,INVALID_PLAYER_ID, playerid);
Attach3DTextLabelToPlayer(playertextidgs[playerid], playerid, 0.0, 0.0, 0.5);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi GameSage!");
}
return 1;
}
if(strcmp(cmd, "/gsoff", true) == 0)
{
if (PlayerInfo[playerid][pGameSage] >= 1)
{
SetPlayerArmour(playerid, 0.0);
SetPlayerHealth(playerid, 100.0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "GameSage {FFFFFF}%s "COL_ZELENA"vise nije na duznosti!",sendername);
BroadCast(ZELENKASTA, string);
Delete3DTextLabel(playertextidgs[playerid]);
return 1;
}
else
{
SendClientMessage(playerid, WHITE, "("COL_RED"LemiAS{FFFFFF}) Nisi GameSage!");
}
return 1;
}
Imam warninge warning 213: tag mismatch i to ovo ...
to je /aon i /aoff
Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);
Delete3DTextLabel(playertextid[playerid]);
a ovde imam warningde isto za /gson i /gsoff
Attach3DTextLabelToPlayer(playertextidgs[playerid], playerid, 0.0, 0.0, 0.5);
Delete3DTextLabel(playertextidgs[playerid]);
pomagajte brzo :)
Vjerojatno nisi definirao playertextid kao playertextid[MAX_PLAYERS];
Jesam...
imam ove warninge
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38566) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38570) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38571) : warning 202: number of arguments does not match definition
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38573) : warning 217: loose indentation
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38580) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38584) : warning 202: number of arguments does not match definition
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38594) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38598) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38599) : warning 202: number of arguments does not match definition
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38608) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38612) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 15432 bytes
Code size: 3716352 bytes
Data size: 3240152 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4487 cells (17948 bytes)
Total requirements: 6988320 bytes
12 Warnings.
Citat: Lemi_Zero poslato Januar 10, 2012, 15:56:52 POSLE PODNE
Jesam...
A jel si obrisao new Text3D:playertextidgs; i stavio new text3D:playertextidgs[MAX_PLAYERS]; tako i za ono drugo ?
ubacio sam kako si mi rekao ali imam ove warninge...
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38572) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38573) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38591) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38612) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38613) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38631) : warning 213: tag mismatch
Citat: Lemi_Zero poslato Januar 10, 2012, 18:34:10 POSLE PODNE
ubacio sam kako si mi rekao ali imam ove warninge...
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38572) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38573) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38591) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38612) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38613) : warning 213: tag mismatch
D:\Razno\Classic Life RolePlay\gamemodes\CLRP.pwn(38631) : warning 213: tag mismatch
daj sve linije na kojima ti izbacuje..
evo linija...
... to su linije kod /aon i /aoff
Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);
Delete3DTextLabel(playertextid[playerid]);
... a ovo su linije kod /gson i /gsoff
Attach3DTextLabelToPlayer(playertextidgs[playerid], playerid, 0.0, 0.0, 0.5);
Delete3DTextLabel(playertextidgs[playerid]);
ako me nekontas sta ocu da ti kazem add me na skype milan.nesic2009
a lol daj ove linije iz svoej skripte : 38631 , 38613 , 38612 , 38591 , 38573 , 38572
evo linija
linija 38626
playertextid[playerid] = CreatePlayer3DTextLabel(playerid,"Admin na duznosti! (Ne Ometaj!)",SVETLOPLAVA,fa,fy,fu,40.0,INVALID_PLAYER_ID, playerid);
linija 38627
Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.7);
linija 38645
Delete3DTextLabel(playertextid[playerid]);
linija 38666
playertextidgs[playerid] = CreatePlayer3DTextLabel(playerid,"GameSage na duznosti! (Ne Ometaj!)",ZELENKASTA2,gfa,gfy,gfu,40.0,INVALID_PLAYER_ID, playerid);
linija 38667
Attach3DTextLabelToPlayer(playertextidgs[playerid], playerid, 0.0, 0.0, 0.5);
linija 38685
Delete3DTextLabel(playertextidgs[playerid]);
eto to su te linije ;)