[Ajuda] darlider - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] darlider (
/showthread.php?tid=586879)
darlider -
JuniorTheDM - 26.08.2015
PHP код:
CMD:darlider(playerid, params[])
{
new id, org, string[256];
if(sscanf(params, "ii", id, org)) return SendClientMessage(playerid, 0x9C9C9CAA, "USE: /darlider [ID] [ORGANIZAЗГO]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0x9C9C9CAA, "Este jogador nгo estб online.");
//LINHA format(string, sizeof(string), "Vocк promoveu %s a lнder da organizaзгo: %s." PlayerName(id), GetOrgName(org));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк foi promovido a lнder %s, pelo admin %s.", PlayerName(id), PlayerName(playerid));
SendClientMessage(id, COLOR_LIGHTBLUE, string);
pDados[id][Organizacao] = org;
pDados[id][Cargo] = 6;
SpawnPlayer(id);
return 1;
}
oque tem de errado
PHP код:
C:\Users\Usuario\Desktop\RPG\gamemodes\BPS.pwn(287) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Usuario\Desktop\RPG\gamemodes\BPS.pwn(287) : error 001: expected token: ";", but found ")"
C:\Users\Usuario\Desktop\RPG\gamemodes\BPS.pwn(287) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\RPG\gamemodes\BPS.pwn(287) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: darlider -
iTakelot - 26.08.2015
PHP код:
CMD:darlider(playerid, params[]){
new
id,
org,
string[256]
;
if(sscanf(params, "ii", id, org))
return SendClientMessage(playerid, 0x9C9C9CAA, "USE: /darlider [ID] [ORGANIZAЗГO]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, 0x9C9C9CAA, "Este jogador nгo estб online.");
format(string, sizeof(string), "administrador(a) %s, promoveu %s .", PlayerName(id), PlayerName(org));
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "Vocк foi promovido a lнder %s, pelo admin %s.", PlayerName(id), PlayerName(playerid));
SendClientMessage(id, -1, string);
pDados[id][Organizacao] = org;
pDados[id][Cargo] = 6;
SpawnPlayer(id);
return 1;
}
Tenta assim.
Re: darlider -
JuniorTheDM - 26.08.2015
iTakelot oq tem de errado aki
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], sucess)
{
if(!sucess) return SendClientMessage(playerid, 0xFF0000FF, "[BBC]: Comando Invalido Para Mais Informaзoes Use ({33CCFF}/ajuda{FFFFFF})");
return 1;
}
PHP код:
C:\Users\Usuario\Desktop\RPG\gamemodes\BPS.pwn(152) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: darlider -
99fe3rnando - 26.08.2015
Correto "success" o seu estб assim "sucess"
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, 0xFF0000FF, "[BBC]: Comando Invalido Para Mais Informaзoes Use ({33CCFF}/ajuda{FFFFFF})");
return 1;
}