Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <zombieplague>
- #define IsComment(%1) (!%1[0]||%1[0]==';'||(%1[0]=='/'&&%1[1]=='/'))
- new Trie:tAuthIDs;
- _LoadAuthIDs() {
- new iFile = fopen("addons/amxmodx/configs/boostovi.ini","rt");
- if( iFile )
- {
- new szAuthID[ 32 ];
- while( !feof( iFile ) )
- {
- fgets( iFile, szAuthID, charsmax( szAuthID ) );
- trim( szAuthID );
- if( !IsComment( szAuthID ) )
- {
- TrieSetCell( tAuthIDs, szAuthID, EOS );
- }
- }
- fclose( iFile );
- }
- }
- public plugin_init() {
- tAuthIDs = TrieCreate();
- _LoadAuthIDs();
- }
- public client_putinserver(id) {
- set_task(15.0,"funcGive",id);
- }
- public funcGive(id) {
- if(!is_user_connected(id))
- return PLUGIN_HANDLED;
- static szAuthID[ 32 ];
- get_user_authid(id, szAuthID, 31 );
- if(TrieKeyExists(tAuthIDs, szAuthID)) {
- zp_set_user_ammo_packs(id, 5000);
- set_hudmessage(255, 0, 0, -1.0, 0.28, 0, 6.0, 12.0)
- show_hudmessage(id, "Hvala vam sto ste boostovali server! ^nDobili ste ammo packs!")
- }
- return PLUGIN_HANDLED;
- }
- public plugin_end() {
- TrieDestroy(tAuthIDs);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement