Jб que sabemos sу criticar,vamos demostrar nosso espнrito natalino e ajudar o rapaz!
Pelo menos hoje.
Topo do GM
pawn Код:
new TempoHelper;
new helpertrabalhando[MAX_PLAYERS];
enum pInfo
{
pHelper
};
/ah
pawn Код:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/ah", true) == 0 || strcmp(cmd, "/helper", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/ah)dmin/helper [admin/helper chat]");
return 1;
}
format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendAdminMessage(COLOR_YELLOW, string);
}
printf("Admin %s: %s", sendername, result);
{
if (PlayerInfo[playerid][pHelper] >= 1)
{
SendAdminMessage(COLOR_YELLOW, string);
}
printf("Admin %s: %s", sendername, result);
}
}
return 1;
}
/tv
pawn Код:
if(strcmp(cmd, "/tv", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] <1)
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк nгo estб autorizado a usar este comando");
return 1;
}
if(admintrabalhando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/pa)");
return 1;
}
if(helpertrabalhando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/helperajudar)");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAdmin] >=1)
{
if(WatchingTV[playerid] < 1)
{
GetPlayerPos(playerid, Unspec[playerid][Coords][0],Unspec[playerid][Coords][1],Unspec[playerid][Coords][2]);
}
}
if(Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] >=1)
{
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
PlayerInfo[playerid][pLocal] = 255;
gTeam[playerid] = 0;
}
tmp = strtok(cmdtext, idx);
if(strcmp("off", tmp, true, strlen(tmp)) == 0)//SE QUISER MUDAR POR EXEMPLO /TV DESLIGAR SУ ALTERAR O "OFF"
{
if(WatchingTV[playerid] > 0)
{
WatchingTV[playerid] = 0;
Spectate[playerid] = 253;
GameTextForPlayer(playerid, "~w~ TV~n~~r~ DESLIGADA", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Voce nao esta assistindo a TELEVISAO !");
return 1;
}
}
/helpers
pawn Код:
if (strcmp(cmd, "/helpers", true) == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Helpers Online:");
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pHelper] > 0)
{
if(helpertrabalhando[i] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pHelper] == 1)
{
format(string, 256, "Helper: %s [Helper Level 1] (Trabalhando)", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 2)
{
format(string, 256, "Helper: %s [Helper Level 2] (Trabalhando)", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 3)
{
format(string, 256, "Helper: %s [Helper Level 3] (Trabalhando)", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 4)
{
format(string, 256, "Helper: %s [Helper Level 4] (Trabalhando)", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i]pHelper] == 5)
{
format(string, 256, "Helper: %s [Helper Level 5] (Trabalhando)", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
}
else
{
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pHelper] == 1)
{
format(string, 256, "Helper: %s [Helper Level 1] |JOGANDO|", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 2)
{
format(string, 256, "Helper: %s [Helper Level 2] |JOGANDO|", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 3)
{
format(string, 256, "Helper: %s [Helper Level 3] |JOGANDO|", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 4)
{
format(string, 256, "Helper: %s [Helper Level 4] |JOGANDO|", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
if(PlayerInfo[i][pHelper] == 5)
{
format(string, 256, "Helper: %s [Helper Level 5] |JOGANDO|", sendername);
SendClientMessage(playerid, 0xF6AD00AA, string);
}
}
}
}
return 1;
}
/avh
pawn Код:
if(strcmp(cmd, "/avisarhelper", true) == 0 || strcmp(cmd, "/avh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pHelper] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um Helper!");
return 1;
}
if(helpertrabalhando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/helperajudar)");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/avh) [text]");
return 1;
}
SendClientMessageToAll(COLOR_LIGHTBLUE, "~ Aviso do Helper ~");
format(string, sizeof(string), "Helper %s - %s", sendername, result);
SendClientMessageToAll(0x33FF00FF, string);
}
return 1;
}
/ir
pawn Код:
if(strcmp(cmd, "/ir", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /ir [ id ]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
{
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/pa)");
return 1;
}
if(helpertrabalhando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/helperajudar)");
return 1;
}
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0)
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, 0x33FF00FF, "Voce foi teleportado pelo Admin/Helper !");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(plo, plname, MAX_PLAYER_NAME);
format(string, sizeof(string), "O Admin/Helper %s Foi Atй %s.",playername,plname);
SendClientMessage(playerid, 0x33FF00FF, string);
SendClientMessage(plo, 0x33FF00FF, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
}
else
{
format(string, sizeof(string), " %d nгo estб online.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
/criarhelp
pawn Код:
if(strcmp(cmd, "/criarhelper", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /criarhelper [ID] [level(1-5)]");
return 1;
}
new para1;
new levelhelper;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if (PlayerInfo[playerid][pHelper] >= 5)//se desejas que um admin de o helper modifique pHelper por pAdmin e o level ^^
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pHelper] = levelhelper;
printf("Helper: %s promoveu %s para Helper no nivel %d.", sendername, giveplayer, levelhelper);
format(string, sizeof(string), "* Vocк foi promovido a administrador, no nнvel %d pelo administrador %s.", levelhelper, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Vocк promoveu %s com nнvel %d.", giveplayer,levelhelper);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode usar esse comando!");
}
}
return 1;
}
/helpajudar
pawn Код:
if(strcmp(cmd, "/helperajudar", true) == 0 || strcmp(cmd, "/ha", true) == 0)
{
if(PlayerInfo[playerid][pHelper] >= 1)
{
if(helpertrabalhando[playerid] > 0)
{
helpertrabalhando[playerid] = 0;
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "|BiL| Aviso da Administraзгo |BiL|");
format(string, 256, "Helper ~> %s [%d] estб Jogando, Digite /admins para mais informaзхes.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
KillTimer(TempoHelper);
SetPlayerHealth(playerid,100);
}
else
{
helpertrabalhando[playerid] = 1;
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessageToAll(COLOR_WHITE, "|BRA| Aviso da Administraзгo |BRA|");
format(string, 256, "Helper ~> %s [%d] estб Trabalhando, Digite /admins para mais informaзхes.",sendername, playerid);
SendClientMessageToAll(COLOR_DBLUE, string);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 99999);
SetPlayerSkin(playerid, 189);//seta a skin 189 se kiser pode mudar pra da staff
TempoHelper = SetTimerEx("Helper", 1000, 1, "i", playerid);
}
}
return 1;
}
/duvida
pawn Код:
if(strcmp(cmd,"/duvida",true) == 0 || strcmp(cmd,"/duv",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, CINZA, "Vocк nгo estб logado!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, CINZA2, "Use: /duvida [Pergunta]");
return 1;
}
format(string, sizeof(string), "Dъvida De %s(ID:%d): %s", sendername, playerid, (result));
ABroadCast(VERDE,string,1);
SendClientMessage(playerid, VERDE, "Sua dъvida foi enviada aos Helpers Presentes.");
}
return 1;
}