25.07.2017, 20:27
CMDetname(playerid,params[]){
new id ,name[28], text[500], newpw[500];
if(admin[playerid]<4) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFF F}You need admin level 4 to use this command");
GetPlayerName(id, name, MAX_PLAYER_NAME);
if(sscanf(params,"uss",id,name,newpw)) return SendClientMessage(playerid,COLOR_RED,"USAGE:{FFFFF F}/setname [id] [name] [password]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFF F}Player not connected");
new pw[129];
WP_Hash(pw,sizeof(pw),newpw);
if(!dini_Exists(Account(name)))
{
SetPlayerName(id,name);
dini_Create(Account(id));
dini_Set(Account(id),"password",pw);
dini_IntSet(Account(id),"money",0);
dini_IntSet(Account(id),"color",GetPlayerColor(pla yerid));
dini_IntSet(Account(id),"score",0);
dini_IntSet(Account(id),"admin",0);
}
else if(dini_Exists(Account(name)))
{
}
return 1;}
the bold ones have error
C:\Users\John\Desktop\ESDS 0.3.7 NEW 2\gamemodes\ESDS.pwn(5645) : error 035: argument type mismatch (argument 1)
C:\Users\John\Desktop\ESDS 0.3.7 NEW 2\gamemodes\ESDS.pwn(5655) : error 035: argument type mismatch (argument 1)
new id ,name[28], text[500], newpw[500];
if(admin[playerid]<4) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFF F}You need admin level 4 to use this command");
GetPlayerName(id, name, MAX_PLAYER_NAME);
if(sscanf(params,"uss",id,name,newpw)) return SendClientMessage(playerid,COLOR_RED,"USAGE:{FFFFF F}/setname [id] [name] [password]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFF F}Player not connected");
new pw[129];
WP_Hash(pw,sizeof(pw),newpw);
if(!dini_Exists(Account(name)))
{
SetPlayerName(id,name);
dini_Create(Account(id));
dini_Set(Account(id),"password",pw);
dini_IntSet(Account(id),"money",0);
dini_IntSet(Account(id),"color",GetPlayerColor(pla yerid));
dini_IntSet(Account(id),"score",0);
dini_IntSet(Account(id),"admin",0);
}
else if(dini_Exists(Account(name)))
{
}
return 1;}
the bold ones have error
C:\Users\John\Desktop\ESDS 0.3.7 NEW 2\gamemodes\ESDS.pwn(5645) : error 035: argument type mismatch (argument 1)
C:\Users\John\Desktop\ESDS 0.3.7 NEW 2\gamemodes\ESDS.pwn(5655) : error 035: argument type mismatch (argument 1)