PHP код:
if (strcmp("/infosocio", cmdtext, true, 10) == 0 || strcmp("/infoso", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_DBLUE, "|B_P_F|Sуcios do Server|B_P_F|");
for(new x=0; x<sizeof(SocioInfo); x++)
{
if(strcmp(SocioInfo[x][sNick],"Ninguem",true) != 0)
{
format(string, sizeof(string), "Sуcio ID:[%d]: %s Nнvel:[%d]", x, SocioInfo[x][sNick], SocioInfo[x][sTipo]);
SendClientMessage(playerid, COLOR_AZULBB, string);
}
}
return 1;
}
if(strcmp(cmd, "/darsocio", true) ==0 || strcmp(cmd, "/setarsocio", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1339)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
}
SocioVaga();
if(VagaSobrando == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparsocio primeiro.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [Nivel] 1(Socio Bronze) 2(Socio Prata) 3(Socio Ouro)");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [Nivel] 1(Socio Bronze) 2(Socio Prata) 3(Socio Ouro)");
return 1;
}
level = strval(tmp);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof string, "Vocк %s Setou Todos Status Sуcio [%d] para %s",sendername,level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof string, "O Administrador %s Setou Todos Status Sуcio [%d] Em Vocк",sendername,level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu Socio ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute);
SocioLog(string);
PlayerInfo[para1][pSocio] = level;
new var03 = 0;
for(new i = 0; i < sizeof(SocioInfo); i++)
{
if(strcmp(giveplayer,SocioInfo[i][sNick],true)==0)
{
SocioInfo[i][sTipo] = level;
SaveSocio();
var03 = 1;
break;
}
}
if(var03 == 0)
{
for(new i = 0; i < sizeof(SocioInfo); i++)
{
if(strcmp("Ninguem",SocioInfo[i][sNick],true)==0)
{
strmid(SocioInfo[i][sNick], giveplayer, 0, strlen(giveplayer), 255);
SocioInfo[i][sTipo] = level;
SaveSocio();
break;
}
}
}
}
}
}
return 1;
}
if (strcmp("/limparsocio", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1342)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparsocio [Vaga]");
return 1;
}
new Vagao = strval(tmp);
if(Vagao < 0 || Vagao > 50) { SendClientMessage(playerid, COLOR_GREY, "Vaga mнnima 0 mбximo 50!"); return 1; }
if(IsPlayerOnline(SocioInfo[Vagao][sNick]))
{
new id=GetPlayerID(SocioInfo[Vagao][sNick]);
PlayerInfo[id][pSocio] = 0;
SendClientMessage(id, COLOR_YELLOW, "Vocк perdeu seu Sуcio, renove-o e receba seus benefнcios de volta");
}
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s limpou sуcio vaga %d de %s (%d/%d/%d - %d:%d)",PlayerName(playerid),Vagao,SocioInfo[Vagao][sNick],day, month, year,hour, minute);
SocioLog(string);
strmid(SocioInfo[Vagao][sNick], "Ninguem", 0, strlen("Ninguem"), 255);
SocioInfo[Vagao][sTipo] = 0;
SaveSocio();
format(string, sizeof(string), "Vocк Limpou A Vaga VIP Nє %d",Vagao);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}[/i]