01.10.2016, 05:47
If this one help you to understand :
PHP код:
CMD:set(playerid, params[])
{
if(pAccount[playerid][pAdmin] < ADMIN) return ErrorMsg(playerid, false);
new
parametre[30+'\0'],
scmd[50];
if(sscanf(params, "s[30]S()[130]", parametre, scmd)) return SCM(playerid, LBLUE, "/set [money - score - kills - death - skin - vhp - hp - armor - v(irtual)w(orld) - int(erior)]");
if(!strcmp(parametre, "money"))
{
if(pAccount[playerid][pAdmin] < SADMIN) return ErrorMsg(playerid, false);
new cible,
money;
if(sscanf(scmd, "ui", cible, money)) return SCM(playerid, LBLUE, "/set money [playerid/name] [montant]");
if(!IsPlayerConnected(cible))
return ErrorMsg(playerid, _, "Ce personne n'est pas connectйe.");
GivePlayerMoney(cible, GetPlayerMoney(cible) + money);
if(money > 0)
return InfoAnnonce(cible, "%i$ on йtй crйditйs sur votre agent de poche.", money);
else
return InfoAnnonce(cible, "%i$ ont йtй retirйs de votre argent de poche.", 0-money);
}

