/try help ASAP
#8

pawn Code:
if(strcmp("/try", cmdtext, true, 4) == 0)
    {
        if(strlen(cmdtext) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Ussage: /try [text]");
        {
            new name[25], string[64];
             GetPlayerName(playerid, name, 25);
               switch(random(3))
             {
                  case 0:
                {
                    format(string, 64, "%s Tries to: %s and succeeds", name, cmdtext);
                    SendClientMessage(playerid, 0xF9B7FFAA, string);
                }
                case 2:
                {
                    format(string, 64, "%s Tries to %s but fails", name, cmdtext);
                    SendClientMessage(playerid, 0xF9B7FFAA, string);
                }
                case 3:
                {
                    format(string, 64, "%s Tries to %s but fails", name, cmdtext);
                    SendClientMessage(playerid, 0xF9B7FFAA, string);
                }
             }
        }
        return 1;
    }
This will work, but only will appear "yourname Tries to /try but fails".. or "yourname Tries to /try and succeeds"

Modify it with sscanf.. or better use zcmd and there is no need of sscanf for this.
Reply


Messages In This Thread
/try help ASAP - by Luis- - 19.10.2010, 20:57
Re: /try help ASAP - by Cameltoe - 19.10.2010, 20:59
Re: /try help ASAP - by iggy1 - 19.10.2010, 21:00
Respuesta: /try help ASAP - by The_Moddler - 19.10.2010, 21:06
Re: /try help ASAP - by Luis- - 19.10.2010, 21:09
Re: /try help ASAP - by iggy1 - 19.10.2010, 21:12
Re: /try help ASAP - by Cameltoe - 19.10.2010, 21:16
Respuesta: /try help ASAP - by The_Moddler - 19.10.2010, 21:37
Re: /try help ASAP - by Cameltoe - 19.10.2010, 21:50
Re: /try help ASAP - by iggy1 - 19.10.2010, 21:52
Re: /try help ASAP - by Cameltoe - 19.10.2010, 22:05
Respuesta: Re: /try help ASAP - by The_Moddler - 19.10.2010, 22:14

Forum Jump:


Users browsing this thread: 4 Guest(s)