PHP
dcmd_sdm(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
return SendClientMessage(playerid, COLOR_RED, "Du bist nicht befugt.");
}
new pID;
if(sscanf(params, "u", pID))
{
return SendClientMessage(playerid, COLOR_RED, "Benutze: /sdm [ID/Name]");
}
else if(!IsPlayerConnected(pID))
{
return SendClientMessage(playerid, COLOR_RED, "* Spieler nicht online.");
}
else
{
PlayerInfo[pID][sdm] = 1;
SCheck[pID] = 0;
SetPlayerPos(pID, -368.3055,1580.5216,76.0606);
SetPlayerFacingAngle(pID, 132.1568);
SetPlayerInterior(pID, 0);
SetPlayerVirtualWorld(pID, random(20));
SetPlayerHealth(pID, 2000);
SetPlayerCheckpoint(pID, -302.1567,1505.5756,75.4271, 20);
new plname[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME], string[150];
GetPlayerName(pID, plname, MAX_PLAYER_NAME);
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(string, sizeof(string), "[ADMIN] %s hat %s zum Checkpointlaufen verdonnert.", aname, plname);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
return 1;
}
dcmd(sdm, 3, cmdtext);
dcmd(unsdm, 5, cmdtext);
if(PlayerInfo[playerid][sdm] == 1)
{
if(SCheck[playerid] == 0)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -305.8456,1395.2998,72.3109, 20);
SendClientMessage(playerid, COLOR_RED, "{FF9200}Tja, das hast du nun davon. Viel Spaß beim Checkpoints ablaufen wünscht dir das {A65F00}[Blue]-Team");
}
else if(SCheck[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -370.7519,1463.3379,62.6748, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf kein sinnloses DM machen.");
}
else if(SCheck[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -326.3684,1316.5472,52.7271, 20);
SendClientMessage(playerid, COLOR_RED, "Ich muss mich stets an die Regeln halten.");
}
else if(SCheck[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -427.8634,1446.2910,34.2663, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf nicht Offlineflüchten.");
}
else if(SCheck[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -369.6683,1289.8159,24.6201, 20);
SendClientMessage(playerid, COLOR_RED, "Ein Regelbruch rechtfertigt keinen Regelbruch.");
}
else if(SCheck[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -120.8555,1254.1990,18.2093, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf nicht Cheaten.");
}
else if(SCheck[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -110.6854,1143.3524,19.7422, 20);
SendClientMessage(playerid, COLOR_RED, "Ich habe die Entscheidungen der Admins zu respektieren.");
}
else if(SCheck[playerid] == 7)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -109.8715,1033.6832,19.8932, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf mich nicht während eines Kampfes heilen.");
}
else if(SCheck[playerid] == 8)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -502.4140,769.0455,13.5677, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf niemanden kurz nach seinem Spawn töten.");
}
else if(SCheck[playerid] == 9)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -640.3742,864.5109,2.0000, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf kein sinnloses DM machen.");
}
else if(SCheck[playerid] == 10)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -658.3447,921.8128,12.1275, 20);
SendClientMessage(playerid, COLOR_RED, "Ich muss mich stets an die Regeln halten.");
}
else if(SCheck[playerid] == 11)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -834.9407,1009.0457,24.3336, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf nicht Offlineflüchten.");
}
else if(SCheck[playerid] == 12)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -825.1421,1078.9296,34.5706, 20);
SendClientMessage(playerid, COLOR_RED, "Ein Regelbruch rechtfertigt keinen Regelbruch.");
}
else if(SCheck[playerid] == 13)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1258.5864,763.3265,34.5781, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf nicht Cheaten.");
}
else if(SCheck[playerid] == 14)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1651.7816,477.6601,20.0784, 20);
SendClientMessage(playerid, COLOR_RED, "Ich habe die Entscheidungen der Admins zu respektieren.");
}
else if(SCheck[playerid] == 15)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1890.7040,309.8223,12.6667, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf mich nicht während eines Kampfes heilen.");
}
else if(SCheck[playerid] == 16)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1942.3967,196.8485,25.2056, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf niemanden kurz nach seinem Spawn töten.");
}
else if(SCheck[playerid] == 17)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2003.6669,320.2211,34.5850, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf kein sinnloses DM machen.");
}
else if(SCheck[playerid] == 18)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2251.8315,320.0759,34.7387, 20);
SendClientMessage(playerid, COLOR_RED, "Ich muss mich stets an die Regeln halten.");
}
else if(SCheck[playerid] == 19)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2373.6206,508.5233,28.6879, 20);
SendClientMessage(playerid, COLOR_RED, "Ich darf nicht Offlineflüchten.");
}
else if(SCheck[playerid] == 20)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2539.7063,340.4852,19.3556, 20);
SendClientMessage(playerid, COLOR_RED, "Ein Regelbruch rechtfertigt keinen Regelbruch.");
}
else if(SCheck[playerid] == 21)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2606.8345,348.9117,3.7406, 20);
SendClientMessage(playerid, COLOR_RED, "Wir hoffen du hast deine Lektion gelernt und wirst nicht mehr negativ auffallen.");
}
else if(SCheck[playerid] == 22)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2707.0471,468.1042,3.7412, 20);
SendClientMessage(playerid, COLOR_RED, "Trotzdem solltest du dir die Serverregeln im Forum noch einmal gründlich durchlesen.");
}
else if(SCheck[playerid] == 23)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2985.5781,470.6364,4.9141, 20);
SendClientMessage(playerid, COLOR_RED, "Viel Spaß weiterhin wünscht dir das Dark Revelution Reallife-Team.");
}
else if(SCheck[playerid] == 24)
{
DisablePlayerCheckpoint(playerid);
PlayerInfo[playerid][sdm] = 0;
SetPlayerVirtualWorld(playerid, 0);
SpawnPlayer(playerid);
new plname[MAX_PLAYER_NAME], stringa[100];
GetPlayerName(playerid, plname, MAX_PLAYER_NAME);
format(stringa, sizeof(stringa), "* %s hat seine Strafe abgelaufen.", plname);
SendClientMessageToAll(COLOR_LIGHTRED, stringa);
}
SCheck[playerid] += 1;
}
Alles anzeigen
Hey leute diesen Code hat der nette BLuemoon für mich gefunden Jedoch komme ich nciht weiter Ich kriege errors könnt ihr es bitte vervollständigen? MFG.GermanTropicReallife