Quick Question
#1

What's the easiest/shortest way in doing this. I'm wanting to add more then one virtual world. I'm needing to do this with many commands. Right now it's only disabled for world 1. But I would like 2 other worlds added onto it. Isn't it possible to do it all in one line? Thanks.

pawn Код:
if(GetPlayerVirtualWorld(playerid) != 3) return SendClientMessage(playerid, 0xAFFFFAF, "ERROR: You cannot use this command here.");
Reply
#2

It's possible to do it all in one line like this...

pawn Код:
if(GetPlayerVirtualWorld(playerid) != 3 && GetPlayerVirtualWorld(playerid) != 4) return SendClientMessage(playerid, 0xAFFFFAF, "ERROR: You cannot use this command here.");
But its better to store the player's virtual world in a variable:

pawn Код:
new pWorld = GetPlayerVirtualWorld(playerid);
if(pWorld != 3 && pWorld != 4) return SendClientMessage(playerid, 0xAFFFFAF, "ERROR: You cannot use this command here.");
//If the player isn't in virtual world 3 or 4...
Reply
#3

Thank you PotH3Ad!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)