* Nombre del creador: posva (yo)
* Breve descripci?n de su funci?n: Permite detectar si se han modificado las variables externamente e incluso revertir lo efectos. No es necesario dar creditos, pero se agradecen :D
* Versi?n GM utilizada : :GM8:
* C?digo del Script : Es un conjunto de scripts, asi que lo incluyo en un archivo GMK. Las funciones disponibles son:
CED_init();
[gml]/*
**Initializate the list where the variables are hosted
**CED_init();
*/
__CED_LIST=ds_list_create(); //the list with the variables
__CED_CRYPT=ds_list_create(); //The list with some security info
__CED_VALUES=ds_list_create(); //The list with the changed values pf the variables
__CED_COUNT=0; //the count of variables in the list[/gml]
CED_free();
[gml]/*
**Free the memory used by the list for the cheat control
**CED_free();
*/
ds_list_destroy(__CED_LIST); //the list with the variables
ds_list_destroy(__CED_CRYPT); //The list with some security info
ds_list_destroy(__CED_VALUES); //The list with the changed values pf the variables[/gml]
CED_addvar(string varname);
[gml]/*
**add a variable to the list
**CED_addvar(variable name);
*/
ds_list_add(__CED_LIST,argument0);
ds_list_add(__CED_CRYPT,choose("2","3","4")+string(floor(random_range(1,10))));
ds_list_add(__CED_VALUES,variable_local_get(argument0));
__CED_COUNT+=1;[/gml]
CED_step();
[gml]/*
**Put this in end step after all variable changing
**It will get the variables value and change them
**CED_step();
*/
var i,c;
for (i=0;i<__CED_COUNT;i+=1)
{
c=ds_list_find_value(__CED_CRYPT,i);
ds_list_replace(__CED_VALUES,i,variable_local_get(ds_list_find_value(__CED_LIST,i))*real(string_copy(c,1,1))+real(string_copy(c,2,1)));
}[/gml]
CED_check();
[gml]/*
**Put this inbegin step before variable changing
**Return true if the values have changed
** if (CED_check()) ...
*/
var r;
var i,v,c;
for (i=0;i<__CED_COUNT;i+=1)
{
c=ds_list_find_value(__CED_CRYPT,i);
v=(ds_list_find_value(__CED_VALUES,i)-real(string_copy(c,2,1)))/real(string_copy(c,1,1));
if (v!=variable_local_get(ds_list_find_value(__CED_LIST,i)))
return 1;
}
return 0;[/gml]
CED_restore_all();
[gml]/*
**This will restore all the values to previous one
**It will prevent from variable changing but may not prevent from
**frozen variables, I mean it's not 100% sure to be secure
**CED_restore_all();
*/
var i,v,c;
for (i=0;i<__CED_COUNT;i+=1)
{
c=ds_list_find_value(__CED_CRYPT,i);
variable_local_set(ds_list_find_value(__CED_LIST,i),(ds_list_find_value(__CED_VALUES,i)-real(string_copy(c,2,1)))/real(string_copy(c,1,1)));
}[/gml]
Video demostrativo
http://www.youtube.com/watch?v=ZsQDWAaQw24
DESCARGA: http://www.mediafire.com/?dybzaadq90hz7cr
* Breve descripci?n de su funci?n: Permite detectar si se han modificado las variables externamente e incluso revertir lo efectos. No es necesario dar creditos, pero se agradecen :D
* Versi?n GM utilizada : :GM8:
* C?digo del Script : Es un conjunto de scripts, asi que lo incluyo en un archivo GMK. Las funciones disponibles son:
CED_init();
[gml]/*
**Initializate the list where the variables are hosted
**CED_init();
*/
__CED_LIST=ds_list_create(); //the list with the variables
__CED_CRYPT=ds_list_create(); //The list with some security info
__CED_VALUES=ds_list_create(); //The list with the changed values pf the variables
__CED_COUNT=0; //the count of variables in the list[/gml]
CED_free();
[gml]/*
**Free the memory used by the list for the cheat control
**CED_free();
*/
ds_list_destroy(__CED_LIST); //the list with the variables
ds_list_destroy(__CED_CRYPT); //The list with some security info
ds_list_destroy(__CED_VALUES); //The list with the changed values pf the variables[/gml]
CED_addvar(string varname);
[gml]/*
**add a variable to the list
**CED_addvar(variable name);
*/
ds_list_add(__CED_LIST,argument0);
ds_list_add(__CED_CRYPT,choose("2","3","4")+string(floor(random_range(1,10))));
ds_list_add(__CED_VALUES,variable_local_get(argument0));
__CED_COUNT+=1;[/gml]
CED_step();
[gml]/*
**Put this in end step after all variable changing
**It will get the variables value and change them
**CED_step();
*/
var i,c;
for (i=0;i<__CED_COUNT;i+=1)
{
c=ds_list_find_value(__CED_CRYPT,i);
ds_list_replace(__CED_VALUES,i,variable_local_get(ds_list_find_value(__CED_LIST,i))*real(string_copy(c,1,1))+real(string_copy(c,2,1)));
}[/gml]
CED_check();
[gml]/*
**Put this inbegin step before variable changing
**Return true if the values have changed
** if (CED_check()) ...
*/
var r;
var i,v,c;
for (i=0;i<__CED_COUNT;i+=1)
{
c=ds_list_find_value(__CED_CRYPT,i);
v=(ds_list_find_value(__CED_VALUES,i)-real(string_copy(c,2,1)))/real(string_copy(c,1,1));
if (v!=variable_local_get(ds_list_find_value(__CED_LIST,i)))
return 1;
}
return 0;[/gml]
CED_restore_all();
[gml]/*
**This will restore all the values to previous one
**It will prevent from variable changing but may not prevent from
**frozen variables, I mean it's not 100% sure to be secure
**CED_restore_all();
*/
var i,v,c;
for (i=0;i<__CED_COUNT;i+=1)
{
c=ds_list_find_value(__CED_CRYPT,i);
variable_local_set(ds_list_find_value(__CED_LIST,i),(ds_list_find_value(__CED_VALUES,i)-real(string_copy(c,2,1)))/real(string_copy(c,1,1)));
}[/gml]
Video demostrativo
http://www.youtube.com/watch?v=ZsQDWAaQw24
DESCARGA: http://www.mediafire.com/?dybzaadq90hz7cr