Nome da gang aparecer
#1

Alguem poderia me encinar uma coisa talves simples e eu n to conseguindo fazer
Tipo eu coloquei aki pra quando o player acaba de dominar a gz aparece o nome deli mais tipo como eu faзo pra definir o nome da gang e aparecer o nome da gang quando acabar de dominar a gz?
Reply
#2

Provavelmente tu tem que fazer um if por gangue...

Aн tu pode por por exemplo

Код:
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s e alguma gangue dominaram algum lugar",playername);
SendClientMessageToAll(0xFFFFFF96, string);
Reply
#3

nao e isso falei que quero colocar o nome da gang nao o nome do player
fiz aki mais ta dando erro
pawn Код:
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(214) : error 017: undefined symbol "Argentes"
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(233) : error 017: undefined symbol "Marfiosos"
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(242) : error 017: undefined symbol "VipsGang1"
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(251) : error 017: undefined symbol "VipsGang2"
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(260) : error 017: undefined symbol "VipsGang3"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
new pgang[] =
{
    "Bope",
    "Exercito",
    "Playboys",
    "Noias",
    "Frangos",
    "Argentes",
    "Chineses",
    "Marfiosos",
    "VipsGang1",
    "VipsGang2",
    "VipsGang3",
};
pawn Код:
if(classid == 0)
{
    GameTextForPlayer(playerid,"~n~~r~Equipe do B.O.P.E",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0x0000BBAA);
    pgang[playerid]= Bope;
}
    if(classid == 1)
{
    GameTextForPlayer(playerid,"~n~~r~Faccao das Tropas~n~Armadas Exercito",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0xDC143CAA);
    pgang[playerid]= Exercito;
}
    if(classid == 2)
{
    GameTextForPlayer(playerid,"~n~~r~Faccao dos PlayBoys",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0xFF9900AA);
    pgang[playerid]= Playboys;
}
    if(classid == 3)
{
    GameTextForPlayer(playerid,"~n~~r~Faccao dos Noias",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0xFF66FFAA);
    pgang[playerid]= Noias;
}
if(classid == 4)
{
    GameTextForPlayer(playerid,"~n~~r~Faccao dos Frangos",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0xAA3333AA);
    pgang[playerid]= Frangos;
}
    if(classid == 5)
{
    GameTextForPlayer(playerid,"~n~~r~Faccao dos Argentes",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0x1E90FFAA);
    pgang[playerid]= Argentes;
}
    if(classid == 6)
{
    GameTextForPlayer(playerid,"~n~~r~Faccao dos Chineses",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0xDAA520AA);
    pgang[playerid]= Chineses;
}

    if(classid == 7)
{
    GameTextForPlayer(playerid,"~n~~r~Equipe dos Marfiosos",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0x33AA33AA);
    pgang[playerid]= Marfiosos;
}
    if(classid == 8)
{
    GameTextForPlayer(playerid,"~n~~r~Gang VIP ~n~So para Players Vips",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0x00000000);
    pgang[playerid]= VipsGang1;
}
    if(classid == 9)
{
    GameTextForPlayer(playerid,"~n~~r~Gang VIP ~n~So para Players Vips",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0x00000000);
    pgang[playerid]= VipsGang2;
}
    if(classid == 10)
{
    GameTextForPlayer(playerid,"~n~~r~Gang VIP ~n~So para Players Vips",2000,3);
    SetPlayerPos(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerCameraPos(playerid, 2020.164184, -1199.702026, 20.023437);
    SetPlayerCameraLookAt(playerid, 2013.164184, -1199.702026, 20.023437);
    SetPlayerColor(playerid, 0x00000000);
    pgang[playerid]= VipsGang3;
}
Reply
#4

Faзa assim:
pawn Код:
new pgangnames[][] =
{
    {"Bope"},
    {"Exercito"},
    {"Playboys"},
    {"Noias"},
    {"Frangos"},
    {"Argentes"},
    {"Chineses"},
    {"Marfiosos"},
    {"VipsGang1"},
    {"VipsGang2"},
    {"VipsGang3"}
};

new pgang[MAX_PLAYERS][15];
//request class
pgang[playerid] = pgangnames[classid];
Reply
#5

pawn Код:
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(172) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(181) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(190) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(199) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(208) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(217) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(226) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(236) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(245) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(254) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(263) : error 032: array index out of bounds (variable "pgangnames")
C:\Documents and Settings\Leo\Desktop\TDm\2\gamemodes\Gol.pwn(263) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


12 Errors.
da erro
Reply
#6

Mude o cуdigo que Cynic te passou

De
Код:
pgang[playerid] = pgangnames[classid];
Para
Код:
format(pgang[playerid],15,pgangnames[classid]);
Cynic,strings de formatam,lol :a
Reply
#7

Й, Pawn й foda, corrija ae, Illusion.
Reply
#8

e oque coloco aki ?
pawn Код:
format(string, sizeof(string), "|GANGZONE| - A Gang %s esta tentando conquistar mais um territorio!",oquecolokoaki?);
Reply
#9

pawn Код:
pgang[playerid]
Reply
#10

vo tentar aki vlw pela ajuda
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)