PDA

View Full Version : Chat


rambalili2
30/12/2015, 03:26 PM
When i type this command and i type the text i want it is giving me the usage instad of showing the message



CMD:rm(playerid, params[])
{
if(pInfo[playerid][pRamcl] >= 1)
return SendClientMessage( playerid, 0xFF0000FF, "Command not found! Please try again, or use /cmds to view a list of working commands." );

new text[128];

if(sscanf(params, "s[128]",text))
return SendClientMessage(playerid, RED, "/rm [text]");

format(text, sizeof(text), "[RAMCREWMSG]:(%s){33CCFF}%s: %s", GetRamFromLevel(playerid), rName(playerid), text);
SendRamMessage(COLOR_LIGHTBLUE, text);
return 1;
}

Karan007
30/12/2015, 03:30 PM
Try this :D

CMD:rm(playerid, params[])
{
if(pInfo[playerid][pRamcl] < 1)
return SendClientMessage( playerid, 0xFF0000FF, "Command not found! Please try again, or use /cmds to view a list of working commands." );

new text[128];

if(sscanf(params, "s[128]",text))
return SendClientMessage(playerid, RED, "/rm [text]");

format(text, sizeof(text), "[RAMCREWMSG]:(%s){33CCFF}%s: %s", GetRamFromLevel(playerid), rName(playerid), text);
SendRamMessage(COLOR_LIGHTBLUE, text);
return 1;
}

rambalili2
30/12/2015, 03:36 PM
not working

IceBilizard
30/12/2015, 03:40 PM
CMD:rm(playerid, params[])
{
if(pInfo[playerid][pRamcl] >= 1)
return SendClientMessage( playerid, 0xFF0000FF, "Command not found! Please try again, or use /cmds to view a list of working commands." );

new text[128];

if(sscanf(params, "s",text))
return SendClientMessage(playerid, RED, "/rm [text]");

format(text, sizeof(text), "[RAMCREWMSG]:(%s){33CCFF}%s: %s", GetRamFromLevel(playerid), rName(playerid), text);
SendRamMessage(COLOR_LIGHTBLUE, text);
return 1;
}


if its still not working then you are failing with your sscanf plugin download latest one and re-compile your script with new sscanf plugin and include file.

rambalili2
30/12/2015, 04:01 PM
This one works thanks :D