Making a command in car only
#4

Quote:
Originally Posted by KotZ
now this cmd can be used only in vehicle
Код:
if(!strcmp(cmdtext, "/cb", true, 3))
  {
  	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || (GetPlayerState(playerid) == PLAYER_STATE_PASSENGER))
  	{
		    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF9900AA, "USAGE: /cb [Text]");
		    new str[128];
		    GetPlayerName(playerid, str, sizeof(str));
		    format(str, sizeof(str), "*(CB Radio)%s: %s", str, cmdtext[4]);
		    SendClientMessageToAll(0x9ACD32AA, str);
	  }
    return 1;
  }
Ah that worked perfect! Where in that code would I make it so if someone isn't in the car it says "You must be in a Vehicle to use this command"?
Reply


Messages In This Thread
Making a command in car only - by jesuschristlordandsavior - 09.02.2010, 15:42
Re: Making a command in car only - by Correlli - 09.02.2010, 15:56
Re: Making a command in car only - by akis_tze - 09.02.2010, 17:01
Re: Making a command in car only - by jesuschristlordandsavior - 09.02.2010, 19:01
Re: Making a command in car only - by ray187 - 09.02.2010, 19:03
Re: Making a command in car only - by Correlli - 09.02.2010, 19:06
Re: Making a command in car only - by jesuschristlordandsavior - 09.02.2010, 19:16
Re: Making a command in car only - by IcyBlight - 09.02.2010, 19:26

Forum Jump:


Users browsing this thread: 2 Guest(s)