[Pomoc] Admin Duty i GS Duty

Započeo Lemi_Zero, Januar 09, 2012, 20:20:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Lemi_Zero

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):  //
Poslednja Izmena: Januar 09, 2012, 20:21:50 POSLE PODNE od Lemi_Zero

Ovo ti je funkcija da prikaciš 3D tekst na igraca kojeg ti želiš:
Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
            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);
Poslednja Izmena: Januar 09, 2012, 20:26:37 POSLE PODNE od [CRP] joXy_

Mr.Gagi

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;
}

Lemi_Zero

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];
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong


Lemi_Zero

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.
Poslednja Izmena: Januar 10, 2012, 16:55:31 POSLE PODNE od Lemi_Zero

Mr.Gagi

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 ?

Lemi_Zero

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..

Lemi_Zero

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
Poslednja Izmena: Januar 10, 2012, 18:54:16 POSLE PODNE od Lemi_Zero

a lol daj ove linije iz svoej skripte : 38631 , 38613 , 38612 , 38591 , 38573 , 38572

Lemi_Zero

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 ;)
Poslednja Izmena: Januar 10, 2012, 19:01:43 POSLE PODNE od Lemi_Zero