Simple help
#1

so iv got an pm command
PHP код:
CMD:pm(playeridparams[])
{
    new 
tmp[1080], giveplayeridgiveplayer[25], playername[25],string[1080];
    if(
adlvl[playerid] < && !vipmember[playerid] && helper[playerid] == 0) return 0;
    
GetPlayerName(giveplayeridgiveplayerMAX_PLAYER_NAME);
    if (
sscanf(params"us"giveplayeridtmp)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /pm [playerid] [message]");
    if (!
IsPlayerConnected(giveplayerid)) return SendClientMessage(playeridCOLOR_RED"Error: Inactive player id!");
    if (
giveplayerid == playerid) return SendClientMessage(playeridCOLOR_RED"Error: You can't send private message to your self!");
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    
GetPlayerName(giveplayeridgiveplayerMAX_PLAYER_NAME);
    
format(stringsizeof(string), "{E6E600}PM from %s(%d): %s"playernameplayeridtmp);
    
SendClientMessage(giveplayeridCOLOR_YELLOWstring);
    
format(string,sizeof(string), "{FFFF00}PM to %s(%d): %s"giveplayergiveplayeridtmp);
    
SendClientMessage(giveplayeridCOLOR_YELLOW"You can use /pmr [message] for fast reply.");
    
SendClientMessage(playeridCOLOR_WHITEstring);
    return 
1;

the problem is that the message be like PM FROM name: hi hru bro what ar
and the command cut off at Are o how can I fix it I tried to make the array bigger but didn't work
Reply


Messages In This Thread
Simple help - by silverms - 22.09.2017, 08:20
Re: Simple help - by pollo97 - 22.09.2017, 10:47
Re: Simple help - by silverms - 24.09.2017, 08:12

Forum Jump:


Users browsing this thread: 1 Guest(s)