am besten nutzt du ocmd...
goto:
ocmd:goto(playerid,params[])
{
new plid,Float:pX,Float:pY,Float:pZ,string[128],pName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"u",plid)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /goto [ID/Name]");
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerPos(plid,pX,pY,pZ); SetVehiclePos(GetPlayerVehicleID(playerid),pX+1,pY+1,pZ); GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Admin %s hat sich zu dir teleportiert!",pName); SendClientMessage(plid,0xDEDE00FF,string);
} else {
GetPlayerPos(plid,pX,pY,pZ); SetPlayerPos(playerid,pX+1,pY+1,pZ); GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Admin %s hat sich zu dir teleportiert!",pName); SendClientMessage(plid,0xDEDE00FF,string);
}
}
return SendClientMessage(playerid,0xFFFFFF55,"Du darfst diesen Befehl nicht nutzen!");
}
gethere:
ocmd:gethere(playerid,params[])
{
new plid,Float:pX,Float:pY,Float:pZ,string[128],pName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"u",plid)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /gethere [ID/Name]");
if(IsPlayerInAnyVehicle(plid))
{
GetPlayerPos(playerid,pX,pY,pZ); SetVehiclePos(GetPlayerVehicleID(plid),pX+1,pY+1,pZ); GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Admin %s hat dich zu sich teleportiert!",pName); SendClientMessage(plid,0xDEDE00FF,string);
} else {
GetPlayerPos(playerid,pX,pY,pZ); SetPlayerPos(plid,pX+1,pY+1,pZ); GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Admin %s hat dich zu sich teleportiert!",pName); SendClientMessage(plid,0xDEDE00FF,string);
}
}
return SendClientMessage(playerid,0xFFFFFF55,"Du darfst diesen Befehl nicht nutzen!");
}
kick:
ocmd:kick(playerid,params[])
{
new plid,Float:pX,Float:pY,Float:pZ,string[128],pName[MAX_PLAYER_NAME],Name[MAX_PLAYER_NAME],reason[32];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"us[32]",plid,reason)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /kick [ID/Name] [Grund]");
GetPlayerName(plid,pName,sizeof(pName)); GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"AdmCmd: {FF0000}%s{FFFFFF} wurde von {FF0000}%s{FFFFFF} gekickt, Grund: %s",pName,Name,reason); SendClientMessageToAll(0xFFFFFFFF,string);
Kick(plid);
}
return SendClientMessage(playerid,0xFFFFFF55,"Du darfst diesen Befehl nicht nutzen!");
}
ban:
ocmd:ban(playerid,params[])
{
new plid,Float:pX,Float:pY,Float:pZ,string[128],pName[MAX_PLAYER_NAME],Name[MAX_PLAYER_NAME],reason[32];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"us[32]",plid,reason)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /ban [ID/Name] [Grund]");
GetPlayerName(plid,pName,sizeof(pName)); GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"AdmCmd: {FF0000}%s{FFFFFF} wurde von {FF0000}%s{FFFFFF} gebannt, Grund: %s",pName,Name,reason); SendClientMessageToAll(0xFFFFFFFF,string);
BanEx(plid,reason);
}
return SendClientMessage(playerid,0xFFFFFF55,"Du darfst diesen Befehl nicht nutzen!");
}
slap:
ocmd:slap(playerid,params[])
{
new plid,Float:pX,Float:pY,Float:pZ,string[128],pName[MAX_PLAYER_NAME],Float:health;
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"u",plid)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /slap [ID/Name]");
GetPlayerName(playerid,pName,sizeof(pName)); GetPlayerPos(plid,pX,pY,pZ); SetPlayerPos(plid,pX,pY,pZ+5);
GetPlayerHealth(plid,health); SetPlayerHealth(plid,health-10);
format(string,sizeof(string),"Du wurdest von Admin %s geslappt!",pName); SendClientMessage(plid,0xFF0000FF,string);
}
return SendClientMessage(playerid,0xFFFFFF55,"Du darfst diesen Befehl nicht nutzen!");
}
ocmd Include:
http://www.file-upload.net/download-7214330/ocmd.inc.html
Pastebin:
http://pastebin.com/LLY9Ypy0
ganz oben zu den includes:
#include <ocmd>
Sollte etwas nicht funktionieren sag mir bescheid.. kann sein dass ich ein fehler gemacht habe (Uhrzeit).
//edit:
a chat
ocmd:a(playerid,params[])
{
new string[256],pName[MAX_PLAYER_NAME],Text[128];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"s[128]",Text)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /a [Text]");
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"AdmChat: %s (AdmLvl: %d): %s",pName,PlayerInfo[playerid][pAdmin],Text);
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i,0xFF0000FF,string);
}
}
}
}
return SendClientMessage(playerid,0xFFFFFF55,"Du darfst diesen Befehl nicht nutzen!");
}
//edit 2:
Du solltest als Script Anfänger (So wie du es in deiner Signatur schreibst) schon selbst wissen wie du es in einem Filterscript einbaust.
//edit 3:
Kleinigkeit geändert