Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 10:07 04.04.2012 Orakel/Siedler
- #include <a_samp>
- enum wr_enum {
- wr_name[64],
- wr_count
- };
- static const WantedReason[][wr_enum] = {
- {"Angriff/Beschuss", 2},
- {"Flucht", 2},
- {"Verweigerung", 1},
- {"Beihilfe z. Flucht", 2}
- };
- public OnPlayerClickPlayer(playerid, clickedplayerid, source) {
- if(playerid==clickedplayerid) return 0;
- if(IsACop(playerid)){
- SetPVarInt(playerid, "clickedid", clickedplayerid);
- new string[128], bigstring[768], giveplayer[MAX_PLAYER_NAME];
- GetPlayerName(clickedplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "Spieler: %s, Aktuelles Wanted Level: %d", giveplayer, WantedLevel[clickedplayerid]);
- for(new i = 0; i < sizeof(WantedReason); i++){
- format(bigstring, sizeof(bigstring), "%s (%d)\n", WantedReason[i][wr_name]);
- }
- ShowPlayerDialog(playerid, 555, DIALOG_STYLE_LIST, string, bigstring, "OK", "Abbruch");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
- new string[128] giveplayer[MAX_PLAYER_NAME];
- switch(dialogid) {
- case: 555 {
- if(!IsACop(playerid))return 0;
- for(new i = 0; i < sizeof(WantedReason); i++) {
- if(listitem==i)
- {
- new criminal = GetPVarInt(i, "clickedid");
- GetPlayerName(criminal, giveplayer, sizeof(giveplayer));
- PlayerInfo[criminal][pCrimes] += 1;
- WantedPoints[criminal] += (WantedReason[i][wr_count]*2);
- WantedLevel[criminal] += WantedReason[i][wr_count];
- SetPlayerCriminal(criminal, playerid, WantedReason[i][wr_name]);
- format(string,sizeof(string),"Du hast den Spieler %s %d Wanted/s wegen %s ausgestellt.", giveplayer, WantedReason[i][wr_count], WantedReason[i][wr_name]);
- SendClientMessage(playerid,COLOR_YELLOW, string);
- return 1;
- }
- }
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment