Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //oben definiert
- new Float:LaufPrison[30][3] = {
- {1342.1566,2844.5896,10.8203}, //1
- {1312.8325,2808.8992,10.8203}, //2
- {1325.1770,2751.2815,10.8203}, //3
- {1288.6094,2731.3621,10.8250}, //4
- {1221.5824,2732.8445,10.8203}, //5
- {1224.2797,2785.3169,10.8125}, //6
- {1221.4663,2848.8538,10.8423}, //7
- {1198.6765,2850.1052,10.8125}, //8
- {1212.8397,2815.4832,10.8203}, //9
- {1180.3118,2781.7559,10.8203}, //10
- {1139.5408,2754.5481,10.8203}, //11
- {1138.8292,2730.0659,10.8281}, //12
- {1187.1580,2730.4980,10.8281}, //13
- {1206.8860,2746.7417,10.8281}, //14
- {1226.3585,2768.8430,10.8203}, //15
- {1260.1567,2778.7515,10.8203}, //16
- {1315.8286,2748.5542,10.8203}, //17
- {1355.8480,2762.1765,10.0435}, //18
- {1392.8462,2750.6030,10.8203}, //19
- {1414.5535,2773.1848,10.8203}, //20
- {1414.1232,2813.9175,10.8203}, //21
- {1407.1130,2847.2422,10.8203}, //22
- {1365.9814,2846.4534,10.8203}, //23
- {1344.7213,2828.3940,10.8203}, //24
- {1329.5938,2810.9419,10.8203}, //25
- {1281.1600,2782.5503,10.8203}, //26
- {1236.5809,2809.8193,10.8125}, //27
- {1197.3298,2803.3982,10.8203}, //28
- {1171.9951,2769.6912,11.2644}, //29
- {1172.2249,2734.7974,10.8281} //30
- };
- //CommandText
- if(strcmp(cmd, "/lprison", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /lprison [playerid/PartOfName] [Checkpoints]");
- return 1;
- }
- new playa;
- new checkp;
- new rand = random(sizeof(LaufPrison));
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- checkp = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 5)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- PlayerInfo[playa][pCheckpoint] = checkp;
- format(string, sizeof(string), "* Du hast %s ins Laufprison gesteckt.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTRED, string);
- format(string, sizeof(string), "* Du wurdest vom Admin %s für %d ins Laufprison gesteckt.", sendername, checkp);
- SendClientMessage(playa, COLOR_LIGHTRED, string);
- SendClientMessage(playa, COLOR_LIGHTRED, "* Laufe nun zu den einzelnen Checkpoints!");
- SendClientMessage(playa, COLOR_LIGHTRED, "* Wenn die Alle Checkpoints abgelaufen hast bist du wieder Frei");
- ResetPlayerWeapons(playa);
- PlayerInfo[playa][pCheckpoint] = checkp;
- format(string, sizeof(string), "AdmCmd: %s wurde von dem Admin %s für %d ins Laufprison gesteckt", giveplayer, sendername, checkp);
- SendClientMessageToAll(COLOR_RED, string);
- SetPlayerPos(playa, 1387.0232,2795.7407,10.5448);
- DisablePlayerCheckpoint(playa);
- SetPlayerCheckpoint(playa, LaufPrison[rand][0], LaufPrison[rand][1], LaufPrison[rand][2], 6.0);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht berechtigt, diesen Befehl zu benutzen !");
- }
- }
- return 1;
- /////////////////////des ist unter EnterCheckpoint
- if(PlayerInfo[playerid][pCheckpoint] > 0)
- {
- new rand = random(sizeof(LaufPrison));
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, LaufPrison[rand][0], LaufPrison[rand][1], LaufPrison[rand][2], 6.0);
- new checkp = PlayerInfo[playerid][pCheckpoint];
- PlayerInfo[playerid][pCheckpoint] = checkp-1;
- format(string, sizeof(string), "Du musst noch %d Checkpoints ablaufen", checkp);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
- }
- if(PlayerInfo[playerid][pCheckpoint] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Du hast alle Checkpoints abgelaufen. Nun bist du Frei!");
- GameTextForPlayer(playerid, "~g~Du bist frei", 5000, 3);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerPos(playerid, 91.9112,1920.7303,17.9953);
- SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000); //Reset world to player
- PlayerInfo[playerid][pDead] = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment