number of arguments
#2

The function SendClientMessage has only 3 Parameters (playerid,color,string). So, if you want to format anything you have to use the function "format" before you send the message.
Look here, I have corrected this:
PHP код:
CMD:car(playerid,params[])
{
    if(
PlayerInfo[playerid][pAdmin] > 1)
    {
        new 
Float:pos[4],vehicle,string[145];
        
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
        
GetPlayerFacingAngle(playerid,pos[3]);
        
vehicle CreateVehicle(411,pos[0],pos[1],pos[2],pos[3],1,1,1200);
        
PutPlayerInVehicle(playerid,vehicle,0);
        
format(string,sizeof string,"You infernus has been spawned %s.",Name(playerid));
        
SendClientMessage(playerid,-1,string);
    }
    else
    {
        
SendClientMessage(playerid, -1"You do not have access to this command");
    }
    return 
1;

Reply


Messages In This Thread
number of arguments - by Steel_ - 06.08.2015, 11:27
Re: number of arguments - by MarvinPWN - 06.08.2015, 11:32
Re: number of arguments - by SilentSoul - 06.08.2015, 11:33
Re: number of arguments - by SpikeSpigel - 06.08.2015, 11:33
Re: number of arguments - by Steel_ - 06.08.2015, 11:36

Forum Jump:


Users browsing this thread: 1 Guest(s)