Guten Tag.
Ich Verstehe einfach nicht wie ich Skydive und Fourdive in ein Filterscript umwandel
Hier :
if(strcmp(cmd, "/skydive", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 2)
{
GetPlayerPos(playerid, rx, ry, rz);
if (IsPlayerConnected(playerid))
{
GivePlayerWeapon(playerid, 46, 0);
SetPlayerPos(playerid,rx, ry, rz+1500);
SendClientMessage(playerid, COLOR_WHITE, "GO!! GO!! GO!!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nur für Admins - MFG Name !");
}
}
return 1;
}
//----------------------------------[FOURDIVE]------------------------------------------------
if(strcmp(cmd, "/fourdive", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /fourdive [playerid1] [playerid2] [playerid3] [playerid4]");
return 1;
}
new para1;
new para2;
new para3;
new para4;
para1 = strval(tmp);
tmp = strtok(cmdtext, idx);
para2 = strval(tmp);
tmp = strtok(cmdtext, idx);
para3 = strval(tmp);
tmp = strtok(cmdtext, idx);
para4 = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if (IsPlayerConnected(para1)){ GivePlayerWeapon(para1, 46, 0); SetPlayerPos(para1,1536.0, -1360.0, 1350.0);SetPlayerInterior(para1,0);PlayerInfo[para1][pInt] = 0;SendClientMessage(para1, COLOR_WHITE, "GO!! GO!! GO!!");}
if ((IsPlayerConnected(para2)) && (para2>0)) { GivePlayerWeapon(para2, 46, 0); SetPlayerPos(para2,1536.0, -1345.0, 1350.0);SetPlayerInterior(para2,0);PlayerInfo[para2][pInt] = 0;SendClientMessage(para2, COLOR_RED, "GO!! GO!! GO!!");}
if ((IsPlayerConnected(para3)) && (para3>0)) { GivePlayerWeapon(para3, 46, 0); SetPlayerPos(para3,1552.0, -1345.0, 1350.0);SetPlayerInterior(para3,0);PlayerInfo[para3][pInt] = 0;SendClientMessage(para3, COLOR_RED, "GO!! GO!! GO!!");}
if ((IsPlayerConnected(para4)) && (para4>0)) { GivePlayerWeapon(para4, 46, 0); SetPlayerPos(para4,1552.0, -1360.0, 1350.0);SetPlayerInterior(para4,0);PlayerInfo[para4][pInt] = 0;SendClientMessage(para4, COLOR_RED, "GO!! GO!! GO!!");}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nur für Admins - !");
}
}
return 1;
}
Und Dieß zum /o An und ausschalten:
if(strcmp(cmd, "/noooc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 && (!noooc))
{
noooc = 1;
BroadCast(COLOR_GRAD1, " Der /ooc Chat wurde von einem Administrator ausgeschaltet!");
}
else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
{
noooc = 0;
BroadCast(COLOR_GRAD1, " Der /ooc Chat wurde von einem Administrator angeschaltet!");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Administrator!");
}
}
return 1;
}