Problem with allowing just one command. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with allowing just one command. (
/showthread.php?tid=156740)
Problem with allowing just one command. -
Kayla.S - 23.06.2010
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;
}
Re: Problem with allowing just one command. -
bigcomfycouch - 24.06.2010
Код:
if(GetPlayerVirtualWorld(playerid) == 2 && strfind(cmdtext, "/chalq", true) != 0) return SendClientMessage(playerid, 0xFF000000, "You Can't Use Commands Here. Type /chalq To Exit.");
Re: Problem with allowing just one command. -
Kayla.S - 24.06.2010
Thanks it worked!