Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //AimInfo FilterScript by SynonymousZ CopyRight entfernen = schlechtes Gewissen!
- #include <a_samp>
- enum wskill{
- wHits,
- wShots,
- wAmmo
- };
- new WeapSkills[MAX_PLAYERS][17][wskill];
- stock const wName[][]=
- {
- {"Colt 45 "}, // 22
- {"Colt 45 (Silenced) "}, // 23
- {"Desert Eagle "}, // 24
- {"Normal Shotgun "}, // 25
- {"Sawnoff Shotgun "}, // 26
- {"Combat Shotgun "}, // 27
- {"Micro Uzi (Mac 10) "}, // 28
- {"MP5 "}, // 29
- {"AK47 "}, // 30
- {"M4 "}, // 31
- {"Tec9 "}, // 32
- {"Country Rifle "}, // 33
- {"Sniper Rifle "}, // 34
- {"Rocket Launcher "}, // 35
- {"Heat-Seeking Rocket Launcher "}, // 36
- {"Flamethrower "}, // 37
- {"Minigun "} // 38
- };
- public OnFilterScriptInit()
- {
- print("AimInfo geladen. Yey! :) ");
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new Ammo;
- new Waffe;
- for(new i; i != 11; i++)
- {
- GetPlayerWeaponData(playerid, i, Waffe, Ammo);
- if(!IsValidWaffe(Waffe))continue;
- if(Ammo > WeapSkills[playerid][Waffe-22][wAmmo])WeapSkills[playerid][Waffe-22][wAmmo] = Ammo;
- if(Ammo < WeapSkills[playerid][Waffe-22][wAmmo])
- {
- WeapSkills[playerid][Waffe-22][wAmmo] --;
- WeapSkills[playerid][Waffe-22][wShots] ++;
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/w", cmdtext, true) == 0)
- {
- WeapSkills[playerid][31-22][wAmmo] = 500;//Muss nicht, da es automatisch auch gesetzt wird.
- GivePlayerWeapon(playerid, 31, 500);
- WeapSkills[playerid][24-22][wAmmo] = 200;
- GivePlayerWeapon(playerid, 24, 200);
- return 1;
- }
- if(strcmp("/wpd", cmdtext, true) == 0)
- {
- new string[2000];
- new HS[17];
- for(new i; i!=39; i++)
- {
- if(!IsValidWaffe(i))continue;
- if(WeapSkills[playerid][i-22][wShots])HS[i-22] = floatround((100.0 / WeapSkills[playerid][i-22][wShots])*WeapSkills[playerid][i-22][wHits]);
- format(string, sizeof string, "%s\n{00FFFF}%s|\t{FF3800}%d %% {FFFFFF}Hits {828282}(Schüsse: %d / Treffer: %d)", string, wName[i-22], HS[i-22], WeapSkills[playerid][i-22][wShots], WeapSkills[playerid][i-22][wHits]);
- }
- ShowPlayerDialog(playerid, 1111, DIALOG_STYLE_LIST, "WaffenSkills", string, "OK","");
- return 1;
- }
- return 0;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID)
- {
- if(!IsValidWaffe(weaponid))return 1;
- WeapSkills[issuerid][weaponid-22][wHits] ++;
- }
- return 1;
- }
- IsValidWaffe(id)
- {
- if(id > 21 && id < 39)return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment