Tja ich bins mal wieder^^
habe ein admin sys in meinen script gemacht so funkt alles nur wenn ich z.b /sethp machen kann ich keine id und auch nicht wie viel hp man bekommt eingeben da kommt dann unknow cmd wenn ich /sethp ohne irgendwas mache sterben alle^^ und das sollte nich so sein^^
hier mal mein admscript
if(strcmp("/veh",cmdtext, true) == 0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
SendClientMessage(playerid,rot," Du bist kein Admin!");
if(!strlen(strget(cmdtext,1))) return SendClientMessage(playerid, rot, "Benutze: /veh [id][farbe 1][farbe 2]");
{
if(!strlen(strget(cmdtext,2))) return SendClientMessage(playerid, rot, "Benutze: /veh [id][farbe 1][farbe 2]");
{
if(!strlen(strget(cmdtext,3))) return SendClientMessage(playerid, rot, "Benutze: /veh [id][farbe 1][farbe 2]");
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, rot, "Du sitzt in einem Fahrzeug");
{
new veh = strval(strget(cmdtext,1));
new Float:x, Float:y, Float:z, auto, Float:za;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,za);
new farbe;
new farbe2;
auto = CreateVehicle(veh,x,y,z,za,farbe,farbe2,10000);
PutPlayerInVehicle(playerid,auto,0);
SendClientMessage(playerid,rot," Du bist kein Admin!");
}}}}}
return 1;
}
if(strcmp("/sethp",cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
new giveplayer = strval(strget(cmdtext, 1));
new leben = strval(strget(cmdtext, 2));
SetPlayerHealth(playerid,leben);
SendClientMessage(playerid,rot," Du bist kein Admin!");
{
return 1;
} }}}
// Waffen geben
if(strcmp("/givegun", cmdtext, true) == 0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
new giveplayer = strval(strget(cmdtext, 1));
new waffe = strval(strget(cmdtext, 2));
new muni = strval(strget(cmdtext, 3));
GivePlayerWeapon(giveplayer,waffe,muni);
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} } }
// Skin ändern
if(strcmp("/setskin", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
new giveplayer = strval(strget(cmdtext, 1));
new skin = strval(strget(cmdtext, 2));
SetPlayerSkin(giveplayer,skin);
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} }}
// Freeze und Unfreeze
if(strcmp("/freeze", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
new giveplayer = strval(strget(cmdtext, 1));
TogglePlayerControllable(giveplayer,0);
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} } }
if(strcmp("/unfreeze", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
new giveplayer = strval(strget(cmdtext, 1));
TogglePlayerControllable(giveplayer,1);
return 1;
} } }
// Kick & Ban
if(strcmp("/kick", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
SendClientMessage(playerid,rot, " Du bist kein Admin!");
{
new target = strval(strget(cmdtext, 1));
Kick(target);
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} } }
if(strcmp("/ban", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
new target = strval(strget(cmdtext, 1));
Ban(target);
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} }}
// GOTO and GETHERE
if(strcmp("/goto", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
if(IsPlayerConnected(typ))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(typ,x,y,z); SetPlayerPos(playerid,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(typ)); }
else { SendClientMessage(playerid,hellblau,"Falsche ID"); }
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} }}
if(strcmp("/gethere", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 )
{
{
if(IsPlayerConnected(typ)) {
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z); SetPlayerPos(typ,x,y,z); SetPlayerInterior(typ,GetPlayerInterior(playerid)); }
else { SendClientMessage(playerid,hellblau,"Falsche ID"); }
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} }}
if(strcmp("/weather", cmdtext, true) ==0)
{
if(PlayerInfo[playerid][padmlvl] >= 1 ) {
{
new wetter = strval(strget(cmdtext, 1));
SetWeather(wetter);
SendClientMessage(playerid,rot," Du bist kein Admin!");
return 1;
} }}
if(strcmp("/say",cmdtext, true, 10) == 0) {
if(PlayerInfo[playerid][padmlvl] >= 1 ) {
} {
new name[32], string[256];
GetPlayerName(playerid,name,32);
format(string, 256,"*** [AdM]%s: %s***", name, cmdtext[15]);
SendClientMessageToAll(TÜRKIS, string);
SendClientMessage(playerid,rot," Du bist kein Admin!");
}
return 1;
}