Command Screwup
#1

I Dont Know if its just my CMDS. but when I Try to do a Command, it does the Other One.

/kill was /enter and /enter was /kill.

Heres my Code:
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true))
{
SetPlayerHealth(playerid, 0.00);
return 1;
}
if (strcmp("/enter", cmdtext, true))
{
if(IsPlayerInRangeOfPoint(playerid, 5, 2446.0437,2376.1707,12.1635))
{
SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
return 0;
}

I Think its quite possibly a 0.3c Bug, Cuz Ive never seen this before.
Reply
#2

You forgot that strcmp returns 0 when it succeeds

If(strcmp("/enter",cmdtext,true)==0)
Reply
#3

Oh Thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)