Problem with allowing just one command.
#1

Ok. I've set it so nobody can use any commands in Virtual world 2. All I want is to allow a /chalq command. That way people can exit the course. I've tried some things but it still won't allow me to use this one command there. Here's the code. Any help would be great. Thanks

pawn Код:
if(GetPlayerVirtualWorld(playerid) == 2) { return SendClientMessage(playerid, 0xFF000000, "You Can't Use Commands Here. Type /chalq To Exit.");
 
}

    else if(strcmp("/chalq", cmdtext, true, 6) == 0)
  {
    new PlayerVW = GetPlayerVirtualWorld(playerid);
        if(PlayerVW == 2)
        SetPlayerPos(playerid, 3637.6782,-1994.9304,58.9765);
    return 1;
  }
Reply
#2

Код:
if(GetPlayerVirtualWorld(playerid) == 2 && strfind(cmdtext, "/chalq", true) != 0) return SendClientMessage(playerid, 0xFF000000, "You Can't Use Commands Here. Type /chalq To Exit.");
Reply
#3

Thanks it worked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)