How to add command to ...
#1

How i can add this command to OnplayerCommandText
Код:
if(strcmp(cmdtext,"/home",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Welcome to home !",4000,6);
return SetVehiclePos(vehicleid,387.7016,2590.6699,16.4900,194.4789);
}
SetPlayerPos(playerid,387.7016,2590.6699,16.4900,194.4789);
GameTextForPlayer(playerid,"Welcome to home !",4000,6);
return 1;
}
my onplayyercommand text is :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (strcmp("/cmds", cmdtext, true, 10) == 0)
  {
        SendClientMessage(playerid, 0xFFFFFFFF, "[TELES] /home ,");
  }
  if(strcmp("/help", cmdtext, true, 10) == 0)
  {
        SendClientMessage(playerid, 0xFFFFFFFF, "[HELP] USE /cmds FOR COMMANDS !");
  }
  return 0;
}
Reply


Messages In This Thread
How to add command to ... - by antsolen - 06.11.2010, 14:47
Re: How to add command to ... - by Kwarde - 06.11.2010, 14:52
Re: How to add command to ... - by Alex_Valde - 06.11.2010, 14:55
Re: How to add command to ... - by antsolen - 06.11.2010, 15:10

Forum Jump:


Users browsing this thread: 1 Guest(s)