How to make a value?
#1

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

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
Reply
#3

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.
Reply
#4

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

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

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;
}
Reply
#7

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)