if(strcmp(cmd, "/ligaradm", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] == 1) { GetPlayerName(playerid, sMsg, MAX_PLAYER_NAME); format( sMsg, sizeof( sMsg ), "* %s estб agora ligado como um moderador.", sMsg ); SendClientMessageToAll( TEAM_BLUE_COLOR, sMsg ); SetPlayerColor(playerid,TEAM_BLUE_COLOR); LigarAdmin[playerid] = 1; SetPlayerArmour(playerid, 10000000); } else if(PlayerInfo[playerid][pAdmin] >= 5) { GetPlayerName(playerid, sMsg, MAX_PLAYER_NAME); format( sMsg, sizeof( sMsg ), "* %s estб agora ligado como um administrador.", sMsg ); SendClientMessageToAll( COLOR_YELLOW, sMsg ); SetPlayerColor(playerid,COLOR_YELLOW); LigarAdmin[playerid] = 0; SetPlayerArmour(playerid, 1000000); SetPlayerHealth(playerid, 1000000); } else { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um administrador!."); return 1; } } return 1; } |
public OnPlayerUpdate(playerid){
if(LigarAdmin[playerid] == 1){
if(IsPlayerInAnyVehicle(playerid)){
new pC = GetPlayerVehicleID(playerid);
SetVehicleHealth(pC,1000.0);
RepairVehicle(pC);
}
SetPlayerHealth(playerid,10000);
SetPlayerArmor(playerid,10000);
}
}
Originally Posted by keller012
ninguem sabe como fazer??
|
if(strcmp(cmd, "/vida", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SetPlayerHealth(playerid,1000000000000000000000000);
SetPlayerArmor(playerid,1000000000000000000000);
GameTextForPlayer(playerid,"Vocк recuperou sua vida",10000,8);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um administrador!.");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/god", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 4) return DenyMessage(playerid, 4);
SetPlayerArmour(playerid, 10000);
SetPlayerHealth(playerid, 10000);
GodTimer[playerid] = SetTimerEx("GodMode", 1, 1, "i", playerid);
SendClientMessage(playerid, COLOR_GREEN, "MODO DEUS LIGADO");
return 1;
}