SA-MP Forums Archive
Chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Chat (/showthread.php?tid=597388)



Chat - rambalili2 - 30.12.2015

When i type this command and i type the text i want it is giving me the usage instad of showing the message



PHP код:
CMD:rm(playeridparams[])
{
    if(
pInfo[playerid][pRamcl] >= 1)
        return 
SendClientMessageplayerid0xFF0000FF"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(playeridRED"/rm [text]");
        
    
format(textsizeof(text), "[RAMCREWMSG]:(%s){33CCFF}%s: %s"GetRamFromLevel(playerid), rName(playerid), text);
    
SendRamMessage(COLOR_LIGHTBLUEtext);
    return 
1;




Re: Chat - Karan007 - 30.12.2015

Try this

PHP код:
CMD:rm(playeridparams[])
{
    if(
pInfo[playerid][pRamcl] < 1)
        return 
SendClientMessageplayerid0xFF0000FF"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(playeridRED"/rm [text]");
        
    
format(textsizeof(text), "[RAMCREWMSG]:(%s){33CCFF}%s: %s"GetRamFromLevel(playerid), rName(playerid), text);
    
SendRamMessage(COLOR_LIGHTBLUEtext);
    return 
1;




Re: Chat - rambalili2 - 30.12.2015

not working


Re: Chat - IceBilizard - 30.12.2015

PHP код:
CMD:rm(playeridparams[])
{
    if(
pInfo[playerid][pRamcl] >= 1)
        return 
SendClientMessageplayerid0xFF0000FF"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(playeridRED"/rm [text]");
        
    
format(textsizeof(text), "[RAMCREWMSG]:(%s){33CCFF}%s: %s"GetRamFromLevel(playerid), rName(playerid), text);
    
SendRamMessage(COLOR_LIGHTBLUEtext);
    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.


Re: Chat - rambalili2 - 30.12.2015

This one works thanks