Error [pawn comp]
#1

help pls
PHP код:
if(strcmp(cmd"/gotohouse"true) == 0)
     {
       if(
pl[playerid][pAdmin]==0)return 1;
       
tmp strtok(cmdtext,idx);
      new 
housenum strval(tmp);
      if(!
strlen(tmp))return send(playeridCOLOR_GRAD2"USAGE: /gotohouse [housenumber]");
      
SetPlayerInterior(playerid,hl[housenum][hInt]);
      
SetPlayerVirtualWorld(playerid,hl[housenum][hWorld]);
      
SetPlayerPos(playerid,hl[housenum][hExitx],hl[hl][hExity],hl[housenum][hExitz]);
     } 
PHP код:
error 017undefined symbol "tmp"
error 017undefined symbol "strtok" 
Reply
#2

Use IZcmd.
Код:
#include izcmd
CMD:gotohouse(p,params[])
{
      if(pl[playerid][pAdmin]==0) return 1;
      if(!strval(params)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gotohouse [housenumber]");
      SetPlayerInterior(playerid,hl[housenum][hInt]);
      SetPlayerVirtualWorld(playerid,hl[housenum][hWorld]);
      SetPlayerPos(playerid,hl[housenum][hExitx],hl[hl][hExity],hl[housenum][hExitz]);
}
This should work.
Reply
#3

yeah use ZCMD or YCMD atleast, this kind of command is too old-fashioned and it's hard to operate with that.
Reply
#4

thank you! =* Gameluner
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)