Getestet auf einen Netcup Windows Server. Ein Tester konnte den Befehl ausführen, obwohl sein Userlevel 1 ist. Warum kann er es ausführen?
ocmd:sethealth(playerid,params[])
{
new pname[MAX_PLAYER_NAME],ename[MAX_PLAYER_NAME],save[13 + MAX_PLAYER_NAME],pid,health,msg_sender[46 + MAX_PLAYER_NAME],msg_empfaenger[46 + MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(save,sizeof(save),"/Spieler/%s.ini",pname);
sInfo[playerid][pLevel] = dini_Int(save,"pLevel");
if(sInfo[playerid][pLevel] > 2)
if(sscanf(params,"ui",pid,health)) return SendClientMessage(playerid,COLOR_YELLOW,"Benutze: /sethealth [Spieler-ID][Health]");
SetPlayerHealth(pid,health);
GetPlayerName(pid,ename,sizeof(ename));
format(msg_sender,sizeof(msg_sender),"Info: Du hast %s's Gesundheit auf %i angepasst",ename,health);
SendClientMessage(playerid,COLOR_LIGHTBLUE,msg_sender);
format(msg_empfaenger,sizeof(msg_empfaenger),"Info: %s hat deine Gesundheit auf %i angepasst.",pname,health);
SendClientMessage(pid,COLOR_LIGHTBLUE,msg_empfaenger);
return 1;
}