Hello, I tried to write a code that would give Jetpack to everyone with sound and screen shaking, but something didn't work, if someone can help, here is the code:
public Command_Jetpack1(iPlayer) { new iPlayers[ 32 ], iPlayersNum;
Hello, I tried to write a code that would give Jetpack to everyone with sound and screen shaking, but something didn't work, if someone can help, here is the code:
public Command_Jetpack1(iPlayer) { new iPlayers[ 32 ], iPlayersNum;
ShowSyncHudMsg(0, g_iEventsHudmessage, "ADMIN %s Has give JetPack to everyone playing!", szname);
PrintToChat(iPlayer, "^4[ZP]^1 ADMIN^4 %s^1 has give a^3 JetPack^1 to everyone playing.", szname); } return 0; }
1. Learn how loops work. 2. Learn how not to complicate easy things. 3. Learn how not to copy codes and learn on your own. 4. Learn all the above 3 points not to make your code redundant.
Fixed version, removed all shits --
public Command_Jetpack1(iPlayer) { new iPlayers[33], iPlayersNum; get_players(iPlayers, iPlayersNum, "ach");
static i, index, iDistance;
for (new i = 0; i < iPlayersNum; ++i) { index = iPlayers[i];
: error 047: array sizes do not match, or destination array is too small : error 001: expected token: ";", but found ":" : error 029: invalid expression, assumed zero : warning 215: expression has no effect : error 017: undefined symbol "PLUGIN_CONTINUE" : warning 203: symbol is never used: "i"
It only works for the first round, then I try on the second it doesn't work. "only shows the message"
I used continue statement to skip players those who already have jetpack. I did that so players don't get extra jetpack and drop their old one. This saves CPU cycles and heap allocations.
Working on a very big AMXX project. Interested and Experienced peoples can contact me. My Facebook = Abhinash Behuria Phone number = 07686091154