~~ ZCMD /pay COMMAND??
#7

Quote:
Originally Posted by CommanderDEATH
Посмотреть сообщение
/buy command is for when you go into a 24/7 shop and type /buy, then a menu comes up and you can buy stuff like; rope, burger, cellphone, bat... I got the ask and reply command done and it works,thanks so much! One thing though please help with /pay command. The below errors come up when I compile with /pay command in my script:
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(182) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(185) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(185) : error 017: undefined symbol "dcmd_pay"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(18 : error 017: undefined symbol "params"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(18 : error 017: undefined symbol "COLOR_RED"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(189) : error 017: undefined symbol "COLOR_GREEN"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(190) : error 017: undefined symbol "COLOR_GREEN"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(194) : error 017: undefined symbol "COLOR_LIGHTBLUE"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(196) : error 017: undefined symbol "COLOR_LIGHTBLUE"
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(199) : warning 217: loose indentation
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(224) : warning 217: loose indentation
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(232) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(232) : warning 217: loose indentation
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(232) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(232) : error 004: function "S@@_OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(237) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(237) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(237) : error 004: function "S@@_OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(242) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(242) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(242) : error 004: function "S@@_OnPlayerStateChange" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(247) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(247) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(247) : error 004: function "S@@_OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(252) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(252) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(252) : error 004: function "S@@_OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(257) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(257) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(257) : error 004: function "S@@_OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(262) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(262) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(262) : error 004: function "S@@_OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(267) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(267) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(267) : error 004: function "S@@_OnRconCommand" is not implemented
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(272) : warning 225: unreachable code
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(272) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MY USERNAME\Desktop\mss\gamemodes\ssfr.pwn(272) : error 004: function "S@@_OnPlayerRequestSpawn" is not implemented


I attached a picture with the pawno code.
* Also don't worry about the color errors I know hot to fix them!
I scripted this command from this tutoriual: https://sampforum.blast.hk/showthread.php?tid=239547
Thank you for helping Rudy and LarryTiger, Please just help me with this last thing. I've been working on this for so long and just want to finish now!
Oh dude. You don't have to paste dcmd_pay code under Onplayertext put it elsewhere

Do this: in post also have:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(pay, 3, cmdtext); // this is the format that you will need to use. number 3 is for the characters of the word pay, "p" "a" "y"
    return 1;
}

dcmd_pay(playerid, params[])
{
    new targetid, value;
    if(sscanf(params, "ui", targetid, value)) return SendClientMessage(playerid, COLOR_RED, "ERROR: /pay [playerid] [amount]");
    else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
    else if(value > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_GREEN, "You can't afford that much");
    else
    {
        GivePlayerMoney(targetid, value);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You received %i from %u");
        GivePlayerMoney(playerid, 0- value);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You transfered %i to %u");
    }
    return 1;
}

Next time put your errors in [ CODE] [/ CODE]
Reply


Messages In This Thread
~~ ZCMD /pay COMMAND?? - by CommanderDEATH - 26.09.2014, 11:38
Re: ~~ ZCMD /pay COMMAND?? - by Rudy_ - 26.09.2014, 11:42
Re: ~~ ZCMD /pay COMMAND?? - by Ghazal - 26.09.2014, 11:45
Re: ~~ ZCMD /pay COMMAND?? - by LarryTiger - 26.09.2014, 12:17
Re: ~~ ZCMD /pay COMMAND?? - by CommanderDEATH - 27.09.2014, 04:46
Re: ~~ ZCMD /pay COMMAND?? - by Rudy_ - 27.09.2014, 05:12
Re: ~~ ZCMD /pay COMMAND?? - by KayJ - 27.09.2014, 05:16
Re: ~~ ZCMD /pay COMMAND?? - by YanLanger - 27.09.2014, 06:00
Re: ~~ ZCMD /pay COMMAND?? - by KayJ - 27.09.2014, 06:58
Re: ~~ ZCMD /pay COMMAND?? - by CommanderDEATH - 28.09.2014, 02:04

Forum Jump:


Users browsing this thread: 1 Guest(s)