18.05.2014, 14:35
I wanna make a thing like GivePlayerCash so what do i use i wanna make GivePlayerXP SetPlayerXP GivePlayerRank with saving also so please can someone give me ideas ?
#include "zcmd"
#include "sscanf2"
COMMAND:xp(playerid, params[])
{
if(PlayerAcc[playerid][AdminLevel] >= 4) // change this to the ranks of your admin.
{
new target;
new amount;
if(sscanf(params, "ud", target, amount)
{
new str[128];
format(str, sizeof(str), "Your XP has been set to %d .", amount);
SendClientMessage(playerid, 0xFFFFFFF, str);
PlayerAcc[playerid][xp] == amount; //change to the way your system works
}
else SendClientMessage(playerid, -1, "USAGE: /xp [playerid/partofname] [amount of xp]");
}
else SendClientMessage(playerid, -1, "This command does not exist in our database.");
return 1;
}
IncreasePlayerXP(playerid,amount);
pawn Код:
|
Well the function to give XP is
Код:
IncreasePlayerXP(playerid,amount); |