Command help
#2

SendClientMessage doesn't work with Floats..
Code:
if(IsPlayerInAnyVehicle(playerid))
	{
		if(GetPlayerVehicleID(playerid) != GetPlayerVehicleID(tid)) return SCM(playerid, RED, ""COL_BLUE"[ERROR]: {FFFFFF}%s has to be in the same vehicle as you to be able to rob!", GetPlayerNameEx(tid));
	}
change it to be like that
Code:
if(IsPlayerInAnyVehicle(playerid))
	{
		if(GetPlayerVehicleID(playerid) != GetPlayerVehicleID(tid))
                {
                         format(string, sizeof(string), "[ERROR]: {FFFFFF}%s has to be in the same vehicle as you to be able to rob!", GetPlayerNameEx(tid));
                         SendClientMessage(playerid, RED, string);
                         return 1;
                 }
and change this
Code:
if(IsPlayerPaused(playerid)) return SCM(playerid, RED, ""COL_BLUE"[ERROR]: {FFFFFF}%s is paused!", GetPlayerNameEx(tid));
to this
Code:
if(IsPlayerPaused(playerid))
                                                                             {
                                                                                   format(string, sizeof(string), "[ERROR]: {FFFFFF}%s is paused!", GetPlayerNameEx(tid));
                                                                                   SendClientMessage(playerid, RED, string);
                                                                                   return 1;
                                                                              }
and make sure to add at the top of the function or cmd
Code:
new string[128];
Reply


Messages In This Thread
Command help - by MrFantasy - 06.06.2017, 14:08
Re: Command help - by JasonRiggs - 06.06.2017, 15:20

Forum Jump:


Users browsing this thread: 1 Guest(s)