24.12.2011, 00:52
pawn Код:
dcmd_cv(playerid, params[])
{
if(Player[playerid][pAdmin] < 1 && Player[playerid][pEnigma] >= 1)
{
SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
return 1;
}
if(!strlen(params))
{
SendClientMessage(playerid, COLOR_GREY, "[USO] /cv <texto>");
return 1;
}
if(Player[playerid][pEnigma] > 0)
{
format(thestring, sizeof(thestring), "[Enigma %d]: %s", Player[playerid][pEnigma], params);
}
else
{
if (Player[playerid][pAdmin] == 1 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Colaborador] %s: %s",Player[playerid][pName],params);
}
else if (Player[playerid][pAdmin] == 2 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Moderador] %s: %s",Player[playerid][pName],params);
}
else if (Player[playerid][pAdmin] == 3 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Sub Admin] %s: %s",Player[playerid][pName],params);
}
else if (Player[playerid][pAdmin] == 4 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Administrador] %s: %s",Player[playerid][pName],params);
}
else if (Player[playerid][pAdmin] == 5 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Supervisor] %s: %s",Player[playerid][pName],params);
}
else if (Player[playerid][pAdmin] == 6 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Organizador] %s: %s",Player[playerid][pName],params);
}
else if (Player[playerid][pAdmin] == 7 )
{
SendClientMessageToAll(COLOR_BLUE,"|______________ Aviso Da Administraзгo ______________| ");
format(thestring, sizeof(thestring), "[Fundador] %s: %s",Player[playerid][pName],params);
}
}
SendClientMessageToAll(COLOR_WHITE,thestring);
WriteLog("admins", thestring);
return 1;
}
#Edit: identado