SA-MP Forums Archive
Need help with CMDS - 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: Need help with CMDS (/showthread.php?tid=502925)



Need help with CMDS - Jacob756 - 26.03.2014

I am having some problem with make a /vw command

I want it like /vw (1-999999)

Can any one tell me how should I do it?


Re: Need help with CMDS - Bingo - 26.03.2014

Elaborate please.

/vw What is it for? What you looking for?


Re: Need help with CMDS - SickAttack - 26.03.2014

/vw = Virtual World.
pawn Код:
CMD:vw(playerid, params[])
{
    new vw, string[100];
    if(sscanf(params,"i", vw) || vw < 0 || vw > 999999)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /vw <0-999999>.");
        return 1;
    }
    format(string, sizeof (string), "You've set your virtual world to %i!", vw);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    SetPlayerVirtualWorld(playerid, vw);
    return 1;
}



Re: Need help with CMDS - Jacob756 - 26.03.2014

Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
Elaborate please.

/vw What is it for? What you looking for?
ItS for virtual world


Re: Need help with CMDS - Jacob756 - 26.03.2014

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
/vw = Virtual World.
pawn Код:
CMD:vw(playerid, params[])
{
    new vw, string[100];
    if(sscanf(params,"i", vw) || vw < 0 || vw > 999999)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /vw <0-999999>.");
        return 1;
    }
    format(string, sizeof (string), "You've set your virtual world to %i!", vw);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    SetPlayerVirtualWorld(playerid, vw);
    return 1;
}
Thx but, when I put it in pawno, it gives me erros when I compile
Undefined symbols params and some more
When I define them, it still gives me the error plz can u make it in the normal way?
Which is:

if(!strcmp(cmdtext, "/help", true))


Re: Need help with CMDS - SickAttack - 26.03.2014

If you are getting errors that means you don't have ZCMD. Download it from here: https://sampforum.blast.hk/showthread.php?tid=91354. I recomend that you use ZCMD because it's way easier and faster than the default one so again give it a try.


Re: Need help with CMDS - Jacob756 - 26.03.2014

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
If you are getting errors that means you don't have ZCMD. Download it from here: https://sampforum.blast.hk/showthread.php?tid=91354. I recomend that you use ZCMD because its way eazier and faster than the default one so again give it a try.
I do have ZCMD and I think the problem is sscanf


Re: Need help with CMDS - SickAttack - 26.03.2014

Then download sscanf. https://sampforum.blast.hk/showthread.php?tid=120356


Re: Need help with CMDS - Jacob756 - 26.03.2014

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Thx it really worked.