30.03.2013, 14:10
In filterscript im using Strcmp and Zcmd.
In Gamemode only Zcmd.
Example of command:
How to change just to zcmd? Noob Friendly please
In Gamemode only Zcmd.
Example of command:
PHP код:
COMMAND:changepassword(playerid,params[])
{
new oldpass[129],newpass[129];
if(sscanf(params,"s[32]s[32]",oldpass,newpass)) return SendClientMessage(playerid,color_red,"USAGE: /changepassword [oldpassword] [newpassword]");
WP_Hash(oldpass,sizeof oldpass,oldpass);
if(strcmp(PlayerInfo[playerid][Password],oldpass)) return SendClientMessage(playerid,color_red,"ERROR! Your current password does not match with your entered password!");
#if USE_MYSQL_DATABASE == true
WP_Hash(PlayerInfo[playerid][Password],129,newpass);
#else
WP_Hash(PlayerInfo[playerid][Password],129,newpass);
#endif
SaveUser(playerid);
return SendClientMessage(playerid,color_green,"Your password has succesfully been changed.");
}