command problem
#1

i have a problem when i enter a command that dont exist this happens


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/cmds", true) == 0)
    SendClientMessage(playerid, 0xDEEE20FF, "/carmenu to spawn cars");
    SendClientMessage(playerid, 0xDEEE20FF, "this is a place holder for another command :P");
    if(strcmp(cmdtext, "/adminhouse", true) == 0)
    SetPlayerPos(playerid,2559.5488,-1769.4063,480.7705);
    return 1;
}
Reply
#2

use this :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/cmds", true) == 0)
    {
    SendClientMessage(playerid, 0xDEEE20FF, "/carmenu to spawn cars");
    SendClientMessage(playerid, 0xDEEE20FF, "this is a place holder for another command :P");
    return 1;
    }
	if(strcmp(cmdtext, "/adminhouse", true) == 0)
    {
	SetPlayerPos(playerid,2559.5488,-1769.4063,480.7705);
	return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)