SA-MP Forums Archive
very little PROBLAM IN COMMAND ITS VERY EAZY - 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)
+--- Thread: very little PROBLAM IN COMMAND ITS VERY EAZY (/showthread.php?tid=529543)



very little PROBLAM IN COMMAND ITS VERY EAZY - ILOVEPAWNV - 02.08.2014

hey all,
im do if player admin level 5
can admin use /gm
im level 20 +rcon
im usig /GM ||/Givemoney
he send me the meesage
but im dont got the money
and i dont know wahy
please help me
Код HTML:
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [Level 5] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  		if(strcmp(cmd, "/GiveMoney", true) == 0 || strcmp(cmd, "/GM", true) == 0) {
        if(!LevelAdmin(playerid))return SendClientMessage(playerid,COLOR_WHITE,"/Help - фчегд же айрд чййоъ,мтжшд дчмг/й");
        if(LevelAdmin(playerid) < 5)return SendClientMessage(playerid,COLOR_RED,"шоъ дагойп щмк ма осфйч вбед тм оръ мбцт фчегд же");
        cmd = strtok(cmdtext, idx);
		if(!strlen(cmd)) return SendClientMessage(playerid, white, "/GiveMoney(GM) [id] [money 1-5,000,000] :цешъ дщйоещ");
        id = strval(cmd);
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Red, ".ма озебш ID");
        cmd = strtok(cmdtext, idx);
		if(!strlen(cmd)) return SendClientMessage(playerid, white, "/GiveMoney [id] [money 1-5,000,000] :цешъ дщйоещ");
        new money = strval(cmd);
		if(money < 0 || money > 5000000) return SendClientMessage(playerid, Red, ".слен щвей");
        Y_GivePlayerMoney(playerid, money);
		format(String, sizeof(String), "$%s дбйа мк %s дагойп", GetNum(money), GetName(playerid));
		SendClientMessage(id, red, String);
		format(String, sizeof(String), "$%s %sдбаъ м",GetNum(money), GetName(id));
		SendClientMessage(playerid, red, String);
        return 1;}
//| -------------------------------------------------------------------------- |
and yes, im try to change Y_GivePlayerMoney
to GivePlayerMoney..
no work!


Re: very little PROBLAM IN COMMAND ITS VERY EAZY - PrivatioBoni - 02.08.2014

Please actually write properly because it's hard to understand your problem.

And gosh, consider using sscanf

And put the code in [pawn] tags.