if(strcmp(cmd,"/infoorg",true)==0)
{
if(IsPlayerConnected(playerid))
{
new teamnumber;
if (PlayerInfo[playerid][pLider] != 0) teamnumber = PlayerInfo[playerid][pLider];
else if (PlayerInfo[playerid][pMembro] != 0) teamnumber = PlayerInfo[playerid][pMembro];
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Voce nгo й Membro de uma Equipe!");
return 1;
}
SendClientMessage(playerid,COLOR_YELLOW2,"Infoorg:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,sizeof(string),"");
if (PlayerInfo[i][pLider] == teamnumber) format(string,sizeof(string),"%s [CHEFE]",sendername);
else if (PlayerInfo[i][pMembro] == teamnumber) format(string,sizeof(string),"%s,Cargo: [%d].",sendername,PlayerInfo[i][pCargo]);
if (strlen(string) > 1) SendClientMessage(playerid,COLOR_WHITE,string);
}
}
}
return 1;
}
Originally Posted by OWNEDBYSERGIO:.
MYSQL? E MT FODA
ai ja arrumei o basico do basico: pawn Код:
|
Originally Posted by andmeida10
a minha duvida e meia parecida:
eu queria, que qualquer membro de uma org (n tem k ser lider), ai dar /membros, aparecesse a lista de membros ONLINE, apenas os online. |
//Membros
if(strcmp(cmd,"/Membros",true)==0)
{
if(IsPlayerConnected(playerid))
{
new teamnumber;
if (PlayerInfo[playerid][pLider] != 0) teamnumber = PlayerInfo[playerid][pLider];
else if (PlayerInfo[playerid][pMembro] != 0) teamnumber = PlayerInfo[playerid][pMembro];
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Voce nгo й Membro de uma Equipe!");
return 1;
}
SendClientMessage(playerid,COLOR_YELLOW2,"Membros:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,sizeof(string),"");
if (PlayerInfo[i][pLider] == teamnumber) format(string,sizeof(string),"%s [CHEFE]",sendername);
else if (PlayerInfo[i][pMembro] == teamnumber) format(string,sizeof(string),"%s,Cargo: [%d].",sendername,PlayerInfo[i][pCargo]);
if (strlen(string) > 1) SendClientMessage(playerid,COLOR_WHITE,string);
}
}
}
return 1;
}
//Membros if (strcmp("/membros", cmdtext,true)==0) { if(IsPlayerConnected(playerid)); { new teamnumber; if (PlayerInfo[playerid][pLider] != 0) teamnumber = PlayerInfo[playerid][pLider]; else if (PlayerInfo[playerid][pMembro] != 0) teamnumber = PlayerInfo[playerid][pMembro]; else { SendClientMessage(playerid,COLOR_GRAD1,"Voce nгo й Membro de uma Equipe!"); return 1; } SendClientMessage(playerid,COLOR_YELLOW2,"Membros:"); for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { GetPlayerName(i,sendername,sizeof(sendername)); format(string,sizeof(string),""); if (PlayerInfo[i][pLider] == teamnumber) format(string,sizeof(string),"%s [CHEFE]",sendername); else if (PlayerInfo[i][pMembro] == teamnumber) format(string,sizeof(string),"%s,Cargo: [%d].",sendername,PlayerInfo[i][pCargo]); if (strlen(string) > 1) SendClientMessage(playerid,COLOR_WHITE,string); } } } return 1; }
C:\Users\Andre\Ambiente de Trabalho\TDM -Next\GM\Uniao\Todos em Pastas\TDM - Next 2\gamemodes\lsw.pwn(1060) : error 036: empty statement C:\Users\Andre\Ambiente de Trabalho\TDM -Next\GM\Uniao\Todos em Pastas\TDM - Next 2\gamemodes\lsw.pwn(1063) : error 017: undefined symbol "PlayerInfo" C:\Users\Andre\Ambiente de Trabalho\TDM -Next\GM\Uniao\Todos em Pastas\TDM - Next 2\gamemodes\lsw.pwn(1063) : warning 215: expression has no effect C:\Users\Andre\Ambiente de Trabalho\TDM -Next\GM\Uniao\Todos em Pastas\TDM - Next 2\gamemodes\lsw.pwn(1063) : error 001: expected token: ";", but found "]" C:\Users\Andre\Ambiente de Trabalho\TDM -Next\GM\Uniao\Todos em Pastas\TDM - Next 2\gamemodes\lsw.pwn(1063) : error 029: invalid expression, assumed zero C:\Users\Andre\Ambiente de Trabalho\TDM -Next\GM\Uniao\Todos em Pastas\TDM - Next 2\gamemodes\lsw.pwn(1063) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.