RSSy MYGO.pl Opublikowano Czerwiec 17, 2024 o 12:45 RSSy Udostępnij Opublikowano Czerwiec 17, 2024 o 12:45 i have 2 errors on this code when i'm try to compile it Here's the Errors : gift.sma(14) : error 088: number of arguments does not match definition gift.sma(45) : error 088: number of arguments does not match definition Thanks:! #include <amxmodx> #include <amxmisc> new g_last_gift_time = -1; // last time a gift was given new g_gifts[][] = { {"armor", 15}, // armor +15 {"health", 30}, // health +30 {"ammo_pack", -1} // infinite ammo } new num_players; public give_gift() { new current_time = get_time(); if (current_time - g_last_gift_time >= 1800) { new random_player = get_random_player(); if (is_user_alive(random_player)) { new random_gift = random(sizeof(g_gifts)-1); client_cmd(random_player, "zp_give %s %d", g_gifts[random_gift][0], g_gifts[random_gift][1]); client_print(random_player, print_console, "Gift given: %s", g_gifts[random_gift][0]); } g_last_gift_time = current_time; } } public get_random_player() { new players[32]; // array to store the players num_players = 0; // number of players in the array for(new i; i < get_maxplayers(); i++) { if(is_user_alive(i)) { players[num_players++] = i; } } return players[random(num_players-1)]; } public plugin_init() { register_plugin("Gift_Plugin", "1.0"); set_task(1800.0, "give_gift"); } public plugin_end() { g_last_gift_time = -1; } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi