stock GetPlayerCheckpointName(p)
{
static _p[30];
if(checkId[p] == c_Flamengo) _p = "Flamengo";
if(checkId[p] == c_Vitoria) _p = "Vitуria";
if(checkId[p] == c_Vasco) _p = "Vasco";
if(checkId[p] == c_Cruzeiro) _p = "Cruzeiro";
if(checkId[p] == c_Saopaulo) _p = "Sгo paulo";
if(checkId[p] == c_Santos) _p = "Santos";
if(checkId[p] == c_Palmeras) _p = "Palmeiras";
if(checkId[p] == c_Fluminen) _p = "Fluminense";
if(checkId[p] == c_Corintia) _p = "Corinthias";
if(checkId[p] == c_Ceara) _p = "Cearб";
if(checkId[p] == c_Garaiano) _p = "Guarani";
if(checkId[p] == c_Gremio) _p = "Gremio";
if(checkId[p] == c_Goias) _p = "Goiбs";
if(checkId[p] == c_Colorado) _p = "Internacional";
if(checkId[p] == c_Botafogo) _p = "Botafogo";
if(checkId[p] == c_Barueri) _p = "Barueri";
if(checkId[p] == c_avai) _p = "Avai";
if(checkId[p] == c_AtletiPR) _p = "AtlйticoPR";
if(checkId[p] == c_AtletiMG) _p = "AtlйticoMG";
if(checkId[p] == c_AtleticoGO)_p = "AtlйticoGO";
return _p;
}
//RESULTARIA NISSO :
/*format(string, sizeof(string),"%s acabou de dominar a GangZone %s",GetNick(playerid),GetPlayerCheckpointName(playerid));
SendClientMessageToAll(0xFFFF00, string);*/
new OrgsNames[MAX_ORGS][24] = {
{"Nenhuma"},
{"Policia Militar"},
{"Policia Federal"},
{"Forзas Armadas"},
{"Bombeiros"},
{"Front Yard Ballas"},
{"Groove Street"},
{"Prefeito"},
{"Hitmans"},
{"San News"},
{"Los Santos Vagos"},
{"Varrio Los Aztecas"},
{"Mafia Russa"},
{"Mafia Yakuza"},
{"BOPE"},
{"Alqaeda"}
};
// RESULTARIA NISSO :
/*format(msg_winner,128,"** Sua gang dominou o territуrio %s da gang %s **", TurfsCoords[zoneid][zName], OrgsNames[defend_gang]);
format(text_winner,128,"Sua gang dominou o territ¦rio %s da gang %s",TurfsCoords[zoneid][zName], OrgsNames[defend_gang]);
TextDrawSetString(WinnerTextDraw,text_winner);
TextDrawAlignment(WinnerTextDraw, 2);*/
o Medo te faz nгo aprender
pelo que vi da sua forma pode ser feito normalmente |
o Medo te faz nгo aprender
pelo que vi da sua forma pode ser feito normalmente |
GetPlayerCheckpointName(p)
{
static _p[30];
switch(checkId[p]){
case c_Flamengo:_p = "Flamengo";
case c_Vitoria:_p = "Vitoria";
case c _Vasco:_p = "Vasco";
case c_Cruzeiro:_p = "Cruzeiro";
case c_Saopaulo:_p = "Sao paulo";
case c_Santos:_p = "Santos";
case c_Palmeras:_p = "Palmeiras";
case c_Fluminen:_p = "Fluminense";
case c_Corintia:_p = "Corinthias";
case c_Ceara:_p = "Ceara";
case c_Garaiano:_p = "Guarani";
case c_Gremio:_p = "Gremio";
case c_Goias:_p = "Goias";
case c_Colorado:_p = "Internacional";
case c_Botafogo:_p = "Botafogo";
case c_Barueri:_p = "Barueri";
case c_avai:_p = "Avai";
case c_AtletiPR:_p = "AtleticoPR";
case c_AtletiMG:_p = "AtleticoMG";
case c_AtleticoGO:_p = "AtleticoGO";
default: _p = "Nenhum"
}
return _p;
}
//usaria normalmente
format(string, sizeof(string),"%s acabou de dominar a GangZone %s",GetNick(playerid),GetPlayerCheckpointName(playerid));
TextDrawSetString(suatextdraw,string);
new Text:Dominado;
Dominado = TextDrawCreate(163.000000, 413.000000, " ");
TextDrawBackgroundColor(Dominado, 68);
TextDrawFont(Dominado, 1);
TextDrawLetterSize(Dominado, 0.270000, 1.000000);
TextDrawColor(Dominado, -1);
TextDrawSetOutline(Dominado, 1);
TextDrawSetProportional(Dominado, 1);
TextDrawSetSelectable(Dominado, 0);
public blablabladisconnect
{
TextDrawHideForPlayer(playerid, Dominado);
//aqui na parte onde domina
GivePlayerMoney(i, 2000);
GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~b~dominado!", 5000, 5);
gzcolor[CPS_GetPlayerCheckpoint(i)-1] = GetPlayerColor(i);
GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));//a gz fica da cor do player
format(string, sizeof(string), "|GANGZONE| - Tem uma {00FFFF}'Gang' {FFFF00}invadindo e dominando mais um territorio!");
SendClientMessageToAll(COLOR_YELLOW, string);
new NomeP[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, NomeP, sizeof(NomeP));
format(sizeof,"O Player %s Dominou o Territorio dos %s", NomeP, Gangs);
TextDrawSetString(Dominado, string);
TextDrawShowForAll(Dominado);
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(78) : error 052: multi-dimensional arrays must be fully initialized
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2543) : warning 219: local variable "string" shadows a variable at a preceding level
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2544) : error 017: undefined symbol "playerid"
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : error 020: invalid symbol name ""
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : warning 215: expression has no effect
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : warning 215: expression has no effect
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : warning 215: expression has no effect
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : error 001: expected token: ";", but found ")"
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : error 029: invalid expression, assumed zero
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Estou tentando fazer aqui e estou apenas com 1 duvida, o " TextDrawShowForPlayer " eu coloco na hora que ele dominar pra aparecer a mensagem ?
|
format(sizeof,
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(78) : error 052: multi-dimensional arrays must be fully initialized
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2543) : warning 219: local variable "string" shadows a variable at a preceding level
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2544) : error 017: undefined symbol "playerid"
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2545) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
new NomeP[MAX_PLAYER_NAME+1], skystr[100];
GetPlayerName(i, NomeP, sizeof(NomeP));
format(skystr 100,"O Player %s Dominou o Territorio dos %s", NomeP, Gangs);
TextDrawSetString(Dominado, skystr);
TextDrawShowForAll(Dominado);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, 100,"O Player %s Dominou o Territorio dos %s", pname, Gangs);
TextDrawSetString(Dominado, string);
TextDrawShowForAll(Dominado);
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(79) : error 052: multi-dimensional arrays must be fully initialized
E:\---\Programaзгo\samp03x_svr_R2_patch1_win32\gamemodes\---.pwn(2563) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
new Gangs[MAX_PLAYERS][24] = {
"Noias",
"Militares",
"Bozo James",
"Agentes",
"Frangos",
"Chinezes",
"Policia",
"Gang",
"Coveiros",
"Manobristas",
"Los Vagos",
"Ballas",
"Grovers",
"Mendigos",
"Mafia",
"Traficante",
"Bad"
};
GetPlayerName(playerid, pname, MAX_PLAYER_NAME); // erro em 'playerid' nao sei porque :\
new Gangs[MAX_PLAYERS][24] = { // 24? sу tem 17 rapaz
"Noias",
"Militares",
"Bozo James",
"Agentes",
"Frangos",
"Chinezes",
"Policia",
"Gang",
"Coveiros",
"Manobristas",
"Los Vagos",
"Ballas",
"Grovers",
"Mendigos",
"Mafia",
"Traficante",
"Bad"
};
new pname[MAX_PLAYER_NAME];
GetPlayerName(i, pname, MAX_PLAYER_NAME);
format(string, 100,"O Player %s Dominou o Territorio dos %s", pname, Gangs); //gangs? cade os parametros? seu codigo estб errado deste a array que vc tentou criar "Gangs" ... seria Gangs[ numero da gang ] nгo teria outro parametro vc teria que refazer a sua array gang retirando o parametro que envolve o MAX_PLAYERS
TextDrawSetString(Dominado, string);
TextDrawShowForAll(Dominado);