View Single Post
Old 16/04/2018, 09:58 AM   #543
ProScripter
Banned
 
Join Date: Apr 2018
Location: India
Posts: 17
Reputation: 0
Default Re: Login and Register System - Dialogs - Using Y_INI

Quote:
Originally Posted by GeorgeLimit View Post
How to set player score in game and Admin level in game?
that is only login/register system not admin system
but here you can use this commands for your server to set yourself admin okaY.
PHP Code:
CMD:setadmin(playeridparams[])
{
 new 
idlevelname[25], gname[25];
 if(
sscanf(params"dd"idlevel)) return SendClientMessage(playerid0xFF000050"Usage: /setadmin [playerid] [level]");
 if(
level || level 0) return SendClientMessage(playerid0xFF000050"Invalid Admin Level.");
 if(!
IsPlayerConnected(id)) return SendClientMessage(playerid0xFF000050"Player isnot connected");
 
GetPlayerName(playeridnamesizeof(name));
 
GetPlayerName(idgnamesizeof(gname));
 
PlayerInfo[id][pAdmin] = level;
 
format(stringsizeof(string), "%s have setted you as %d level admin"namelevel);
 
SendClientMessage(id0xFF0000AAstring);
 
format(stringsizeof(string), "You have setted %s as %d level admin"gnamelevel);
 
SendClientMessage(playerid0xFF0000AAstring);
 return 
1;
}
CMD:setscore(playeridparams[])
{
 new 
idscorename[25], gname[25];
 if(
sscanf(params"dd"idscore)) return SendClientMessage(playerid0xFF000050"Usage: /setscore [playerid] [score]");
 if(
score 9999999 || score 0) return SendClientMessage(playerid0xFF000050"Invalid Scores.");
 if(!
IsPlayerConnected(id)) return SendClientMessage(playerid0xFF000050"Player isnot connected");
 
GetPlayerName(playeridnamesizeof(name));
 
GetPlayerName(idgnamesizeof(gname));
 
SetPlayerScore(idscore);
 
format(stringsizeof(string), "%s have setted your score to %d."namescore);
 
SendClientMessage(id0xFF0000AAstring);
 
format(stringsizeof(string), "You have setted %s scores to %d."gnamescore);
 
SendClientMessage(playerid0xFF0000AAstring);
 return 
1;

ProScripter is offline   Reply With Quote