help|error 017: undefined symbol "cmdtext"
#1

im get this eror on my mod:
error 017: undefined symbol "cmdtext"

here the public:
Code:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == TeleportMenu)
  {
    switch(row)
    {
      case 0:{
        if(strcmp(cmdtext,"/ship",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Pirate Ship",4000,6);
return SetVehiclePos(vehicleid,2029.1528,1545.3250,10.8203);
}
SetPlayerPos(playerid,2029.1528,1545.3250,10.8203);
GameTextForPlayer(playerid,"Pirate Ship",4000,6);
return 1;
}
      }
    }
  }
  return 1;
}
//You will have to sort the indentation out yourselfurn 1;
Reply
#2

this is only used in

if(strcmp(cmdtext,"/ship",true)==0)


OnPlayerCommandText
Reply
#3

pawn Code:
// Use this?
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:current;
  new vehicleid = GetPlayerVehicleID(playerid);
    new State = GetPlayerState(playerid);
  current = GetPlayerMenu(playerid);
  if(current == TeleportMenu)
  {
    switch(row)
    {
      case 0:
            {
            if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
            {
                GameTextForPlayer(playerid,"Pirate Ship",4000,6);
                SetVehiclePos(vehicleid,2029.1528,1545.3250,10.8203);
            }
            else
            {
                SetPlayerPos(playerid,2029.1528,1545.3250,10.8203);
                GameTextForPlayer(playerid,"Pirate Ship",4000,6);
            }
        }
    }
    return 1;
}
Reply
#4

i fix this..
tnx for the help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)