SA-MP Forums Archive
How to make a value? - 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: How to make a value? (/showthread.php?tid=287497)



How to make a value? - styl3raaa - 03.10.2011

For example I "/ numberplate TestNum"
How to take the value after / numberplate?


Re: How to make a value? - iPLEOMAX - 03.10.2011

For basic or OLD method of commands: https://sampwiki.blast.hk/wiki/Strtok

If you want something that's updated or newer, use one of these command processors:
ZCMD or YCMD


Re: How to make a value? - styl3raaa - 03.10.2011

Thnaks,

I prefer the old method, but after I got back on it I drew this error
Код:
C:\Documents and Settings\Petromir Penchev\Desktop\server\gamemodes\driftmod.pwn(210) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: How to make a value? - Kingunit - 03.10.2011

Indentation error .. A bit of ****** will help. Something with your tabs are wrong.
Post it here so we can see it.


Re: How to make a value? - styl3raaa - 03.10.2011

This
Код:
	if(strcmp(cmdtext, "/sf", true)==0)
in line 210


Re: How to make a value? - FireCat - 03.10.2011

Example (I'm writing the code now, sorry for mistakes):
pawn Код:
CMD:numberplate(playerid,params[])
{
    if(strlen(params[0]) == 0) return SendClientMessage(playerid,-1,"USAGE: /numberplate [value]");
    SetVehicleNumberPlate(GetPlayerVehicleID(playerid));
    SetVehicleToRespawn(GetPlayerVehicleID(playerid));
    return 1;
}



Re: How to make a value? - iPLEOMAX - 03.10.2011

This is when you get intendation warnings:
pawn Код:
public OnFilterScriptInit()
{
      SomeFunciton();
    NextFunction();
       Woah(324, "HHH");
  Cr_p("lol", "bad example...");
if(me == iPLEOMAX)
    {
   Yes();
    }
      else
   {
        No();
       }
    return 1;
}
To fix it:
pawn Код:
public OnFilterScriptInit()
{
    SomeFunciton();
    NextFunction();
    Woah(324, "HHH");
    Cr_p("lol", "bad example...");
    if(me == iPLEOMAX)
    {
        Yes();
    } else {
        No();
    }
    return 1;
}