[FilterScript] Dynamic ATM Rob System (ATM Add, Delete) [Y_INI]
#1



Hello everybody, system made for member's request. ATM System is dynamic as add for /atmadd [atm name], delete for /atmdelete [atm id]. Video is below. Thanks!

[ame]http://www.youtube.com/watch?v=o_c39bQfyZ0[/ame]

Click for Download
Reply
#2

Eline Sağlık Abi
Reply
#3

Code:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Come on dude use zcmd for commands.

Code:
forward ATM_TimeUpdater(); public ATM_TimeUpdater()
{
	new
		uString[156];
	for (new i = false; i <= MAX_ATM; i++){
	if(ATMInfo[i][aTime] > 0){
	ATMInfo[i][aTime]--;
	if(ATMInfo[i][aTime] <= 1){
	format(uString,156,"{ffffff}%s(%i)\n{ffffff}State: {77c97d}Active", ATMInfo[i][aName], atm_class);
	Update3DTextLabelText(ATMInfo[i][aLabel], -1, uString);
	ATMInfo[i][aDurum] = true;
	ATMInfo[i][aTime] = 0;
	}
	}
	}
	return true;
}
Not checking if an ATM is actually created.

Code:
SetPVarInt(playerid, "ATMcalinanMiktar", (random(MAX_ATM_PARA))+MIN_ATM_PARA);
You are using regular variables but mix in pvars for no reason use regular variables.

Code:
stock CreateATM(atmname[], Float:aaaX, Float:aaaY, Float:aaaZ, Float:aaaA){
atm_class++;
Code:
stock DestroyATM()
atm_class = 1;
Do I even need to explain the conniptions this will cause in your system.
Reply
#4

Quote:
Originally Posted by Pottus
View Post
Code:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Come on dude use zcmd for commands.

Code:
forward ATM_TimeUpdater(); public ATM_TimeUpdater()
{
	new
		uString[156];
	for (new i = false; i <= MAX_ATM; i++){
	if(ATMInfo[i][aTime] > 0){
	ATMInfo[i][aTime]--;
	if(ATMInfo[i][aTime] <= 1){
	format(uString,156,"{ffffff}%s(%i)\n{ffffff}State: {77c97d}Active", ATMInfo[i][aName], atm_class);
	Update3DTextLabelText(ATMInfo[i][aLabel], -1, uString);
	ATMInfo[i][aDurum] = true;
	ATMInfo[i][aTime] = 0;
	}
	}
	}
	return true;
}
Not checking if an ATM is actually created.

Code:
SetPVarInt(playerid, "ATMcalinanMiktar", (random(MAX_ATM_PARA))+MIN_ATM_PARA);
You are using regular variables but mix in pvars for no reason use regular variables.

Code:
stock CreateATM(atmname[], Float:aaaX, Float:aaaY, Float:aaaZ, Float:aaaA){
atm_class++;
Code:
stock DestroyATM()
atm_class = 1;
Do I even need to explain the conniptions this will cause in your system.
Turkish server owners usually dcmd uses. System firstly shared on Turkish forum site. Zcmd version easily passes.

Thanks for interest

Quote:
Originally Posted by ThugLife2424
View Post
Eline Sağlık Abi
Thank you.
Reply
#5

ATM_TimeUpdater has an array index out of bounds issue and it spams the console if you have crashdetect enabled.

Code:
for (new i = false; i <= MAX_ATM; i++)
should be

Code:
for (new i = 0; i < MAX_ATM; i++)
Reply
#6

Wow, good filterscrit, i will test it in my server

+rep
Reply
#7

Bug:-
When I Do Any Command (/atmadd - /atmdelete) i get unknown command message
Please Fix This Proplem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)