hey.
Wenn ich z.B /makeadmin (meine version settm) machen will.
Steht da: Unknown Server Command.
Hier Code:
(ps, ich bin admin)
dcmd_settm(playerid,params[])
{
new pID, rang, pnameb[MAX_PLAYER_NAME];
if(sscanf(params,"ui",pID,rang))return SendClientMessage(playerid,COLOR_ROT,"Befehl: /settm [playerid][Rang]");
if(SInfo[playerid][pAdmin] >= 5)
{
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(pID,pnameb,sizeof(pnameb));
SInfo[pID][pAdmin] = rang;
format(str,sizeof(str),"Administrator %s hat %s zu Adminrang %d befördert.",pname,pnameb,rang);
SendClientMessageToAll(COLOR_GELB,str);
return 1;
}
return Adminbefehl;
}
dcmd_setchef(playerid,params[])
{
new pID, rang, pnameb[MAX_PLAYER_NAME];
if(sscanf(params,"ui",pID,rang))return SendClientMessage(playerid,COLOR_ROT,"Befehl: /setchef [playerid][Fraktion]");
if(SInfo[playerid][pAdmin] >= 4)
{
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(pID,pnameb,sizeof(pnameb));
SInfo[pID][pLeader] = rang;
SendClientMessage(playerid,0xFFFFFFFF,"Du hast %s zum Chef der %d gemacht.",pnameb,rang);
format(str,sizeof(str),"Teammitglied %s hat %s zur Fraktion %d hinzugefügt.",pname,pnameb,rang);
SendClientMessageToAll(COLOR_GELB,str);
return 1;
}
return Adminbefehl;
}
/e
Warnings (falls es unterstützt)
C:\Users\Home\Desktop\It's Roleplay v0.1\Neuer Ordner\pawno\include\md5.inc(92) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Home\Desktop\It's Roleplay v0.1\Neuer Ordner\gamemodes\Selfmade.pwn(3257) : warning 203: symbol is never used: "params"
C:\Users\Home\Desktop\It's Roleplay v0.1\Neuer Ordner\gamemodes\Selfmade.pwn(3350) : warning 204: symbol is assigned a value that is never used: "vehicleid"
C:\Users\Home\Desktop\It's Roleplay v0.1\Neuer Ordner\gamemodes\Selfmade.pwn(3720) : warning 202: number of arguments does not match definition
C:\Users\Home\Desktop\It's Roleplay v0.1\Neuer Ordner\gamemodes\Selfmade.pwn(3720) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Warnings.