View Full Version : What is avar

13/07/2019, 12:21 AM
Hello guys. So I got this gamemode on the internet and it has a thing called [avar][number] and I dont actually understand what is it and how to use it.https://ibb.co/YPtDg03https://ibb.co/YPtDg03 https://ibb.co/9cGV3qw ThanksCMD:spray(playerid, params [])
if(pInfo[playerid][pClan] == -1) return SendClientMessage(playerid, COLOR_DARKGRAY, "You're not part of a clan.");
if(pInfo[playerid][pCRank] < 3) return SendClientMessage(playerid, COLOR_DARKGRAY, "You not have minimum rank 3.");
if(GetPlayerWeapon(playerid) != 41) return SendClientMessage(playerid, COLOR_DARKGRAY, "You don't have a Spray in hand.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_DARKGRAY, "You can't use this command from inside a vehicle.");
if(vwp[playerid] != 0) return SendClientMessage(playerid, COLOR_DARKGRAY, "You're not in Virtual-World 0.");
pInfo[playerid][aVar][88] = 0;
for(new h = 0; h < sizeof(CWar); h++) if(IsPlayerInRangeOfPoint(playerid, 2.8, CWar[h][Posw][0], CWar[h][Posw][1], CWar[h][Posw][2]))
if(CWar[h][ClanOwn] == pInfo[playerid][pClan]) return SendClientMessage(playerid, COLOR_DARKGRAY, "You can not spray your own wall.");
if(CWar[h][NAttack] > gtm) return SendClientMessage(playerid, COLOR_DARKGRAY, "This wall can not be sprayed at this time.");
if(CWar[h][AttOn] == 1) return SendClientMessage(playerid, COLOR_DARKGRAY, "A wall already spraying.");
if(pInfo[playerid][aVar][111] < gtm) pInfo[playerid][aVar][112] = 0, pInfo[playerid][aVar][43] = -1;
case 0:
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~1/10", 10000, 3), pInfo[playerid][aVar][43] = h;
format(stmsg[playerid], 189, "((Clan War)): %s a inceput sa spray-eze pe peretele #%d detinut de Clanul {%s}%s{77D45F}.", GetName(playerid), h+1, Clan[CWar[h][ClanOwn]][Color], Clan[CWar[h][ClanOwn]][Name]), SendClanMessage(pInfo[playerid][pClan], 0x77D45FFF, stmsg[playerid]);
format(stmsg[playerid], 210, "((Clan War)): Clanul {%s}%s {77D45F}a inceput sa spray-eze peretele #%d detinut de Clanul tau, mergi si omoara adversarul care spray-aza peretele. (/walls)", Clan[pInfo[playerid][pClan]][Color], Clan[pInfo[playerid][pClan]][Name], h+1), SendClanMessage(CWar[h][ClanOwn], 0x77D45FFF, stmsg[playerid]);
case 1: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~2/10", 10000, 3);
case 2: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~3/10", 10000, 3);
case 3: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~4/10", 10000, 3);
case 4: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~5/10", 10000, 3);
case 5: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~6/10", 10000, 3);
case 6: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~7/10", 10000, 3);
case 7: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~8/10", 10000, 3);
case 8: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~9/10", 10000, 3);
case 9: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~spraying...~n~10/10", 10000, 3);
pInfo[playerid][aVar][25] = SetTimerEx("GeneralTimer", 10000, false, "ii", playerid, 29), pInfo[playerid][aVar][88] = 1, pInfo[playerid][aVar][111] = gtm+120, CWar[h][AttOn] = 1;
return 1;
if(pInfo[playerid][aVar][88] == 0) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not at the any walls for spraying, use /walls.");
return 1;

13/07/2019, 01:23 AM
Whoever uses 3 dimensional arrays like that without having the second variable a string is just fucking stupid tbh, you'll never know what it's used for because whoever made that just used every cell in it assigned to something, cell 25 is a timer, cell 88 is obviously a boolean for being near a wall, cell 111 is something related to this gtm thing which i have no idea what it is because you didn't show the full code, cell 112 is probably something that defines the spraying type or whatever.

It's a stupid concept and that's why you should create your own gamemode or use one that was made by someone who doesn't use his ass to think instead of his brain, okay, tyvm.

13/07/2019, 08:52 AM
Totally agree with RogueDrifter. What the hell is avar, gtm, 111 and some other random numbers? It's so hard to give variables a human readable name? It's so damn hard? How the hell can you even recognize something like that when scripting? This is so fuckin stupid and useless.

13/07/2019, 09:14 PM
Ye, I agree with you guys. I tried to figure it out but I still didn't understand what is it. This gamemode is cool but the way he make it is horrible.