/oldstats command help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /oldstats command help (
/showthread.php?tid=162116)
/oldstats command help -
Ivan_Pantovic - 22.07.2010
Hello everyone , i have made this command . It went all good , till i didn't try it . Heres the command :
pawn Код:
if(strcmp(cmd, "/oldstats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /oldstats [playerid/PartOfName] [money] [playinghoues]");
return 1;
}
new playa;
new money;
new playingh;
playingh = strval(tmp);
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
PlayerInfo[playa][pDonateRank] = 1;
SafeGivePlayerMoney(playa, money);
PlayerInfo[playa][pExp] += playingh;
PlayerInfo[playa][pPlayingHours] += playingh;
format(string, sizeof(string), "%s money set to : %d ! Players respect points set to : %d ! Players donate rank set to 1 !", playa, money, playingh);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), "Admin has given you your stats back ! money : %d ! Respect points : %d ! Donate rank : 1 !", playa, money, playingh);
SendClientMessage(playa, COLOR_RED, string);
SendClientMessage(playa, RED, "Type /levelup to level up ! Type /stats to see your stats ! ");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not an Admin !");
return 1;
}
}
return 1;
}
The only thing that is working inside is money adding
PS. donor rank 1 should be gratis , but neather is it working :/
IF you can explean me what did i do wrong inside ..
Re: /oldstats command help -
Ivan_Pantovic - 22.07.2010
Bump :/ , please help me :/