SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 01/08/2012, 09:43 PM   #131
Gumica
Little Clucker
 
Join Date: Jan 2012
Posts: 42
Reputation: 4
Default Re: rCmd.inc - Easiest way to create commands!

When I type wrong cmd ingame, even after that when I type correct cmd it says it's unknown, do I need to post any evidence or someone has same problem like me?
Gumica is offline   Reply With Quote
Old 02/08/2012, 07:15 AM   #132
Dominik.
Little Clucker
 
Join Date: May 2012
Posts: 10
Reputation: 1
Default AW: rCmd.inc - Easiest way to create commands!

I've the same problem like gumica.
Dominik. is offline   Reply With Quote
Old 02/08/2012, 09:47 AM   #133
RyDeR`
High-roller
 
RyDeR`'s Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 3,131
Reputation: 645
Default Re: rCmd.inc - Easiest way to create commands!

I have no idea what would cause that, sorry. It's possible though it's having some leaks somewhere, will take a look at the code again.
__________________

Sup?
RyDeR` is offline   Reply With Quote
Old 02/08/2012, 06:14 PM   #134
Rancho
Big Clucker
 
Join Date: Jun 2012
Location: Turkey / GTATurk
Posts: 58
Reputation: 50
Default Re : rCmd.inc - Easiest way to create commands!

I have 1 command, I created command 'arac'.When I type "/a", "/arac" command performed? Why?
Rancho is offline   Reply With Quote
Old 04/08/2012, 05:55 AM   #135
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 745
Reputation: 137
Default Re: rCmd.inc - Easiest way to create commands!

Just one question, how can we make command with optional parameters like
pawn Code:
//Want height and reason to be optional.
rCmd[uis]->slap(playerid,success,targetid,height=10,reason[20]="None")
{
    if(!success) return SendClientMessage(playerid, 0xFF0000FF, "<> Syntax: /slap [player name/id] [height] [reason]");
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(targetid,X,Y,Z);
    SetPlayerPos(targetid,X,Y,Z+height);
    return 1;
}

Error it give
Code:
F:\server\gamemodes\test.pwn(41) : error 059: function argument may not have a default value (variable "height")
F:\server\gamemodes\test.pwn(41) : error 059: function argument may not have a default value (variable "height")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 08/08/2012, 06:58 AM   #136
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-être pas sur Terre ?
Posts: 1,926
Reputation: 61
Default Re : rCmd.inc - Easiest way to create commands!

Very Nice I will test
__________________
Varkoll_ is offline   Reply With Quote
Old 08/08/2012, 07:15 AM   #137
Varkoll_
High-roller
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-être pas sur Terre ?
Posts: 1,926
Reputation: 61
Default Re : Re: rCmd.inc - Easiest way to create commands!

Quote:
Originally Posted by [MM]RoXoR[FS] View Post
Just one question, how can we make command with optional parameters like
pawn Code:
//Want height and reason to be optional.
rCmd[uis]->slap(playerid,success,targetid,height=10,reason[20]="None")
{
    if(!success) return SendClientMessage(playerid, 0xFF0000FF, "<> Syntax: /slap [player name/id] [height] [reason]");
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(targetid,X,Y,Z);
    SetPlayerPos(targetid,X,Y,Z+height);
    return 1;
}

Error it give
Code:
F:\server\gamemodes\test.pwn(41) : error 059: function argument may not have a default value (variable "height")
F:\server\gamemodes\test.pwn(41) : error 059: function argument may not have a default value (variable "height")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Sorry for double post but have you before try this ?
PHP Code:
rCmd[uis]->slap(playerid,success,targetid,height,reason[20])
{
    
height=10;
    
reason="None";
    
targetid=-1;
    if(!
success)
    {
        if(
targetid == -1)
        {
            return 
SendClientMessage(playerid0xFF0000FF"<> Syntax: /slap [player name/id] [height] [reason]");
        }
    }
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(targetid,X,Y,Z);
    
SetPlayerPos(targetid,X,Y,Z+height);
    return 
1;

__________________
Varkoll_ is offline   Reply With Quote
Old 09/08/2012, 01:48 PM   #138
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 745
Reputation: 137
Default Re: rCmd.inc - Easiest way to create commands!

Nope, I Think I will have to stick to ZCMD and SSCANF
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 13/08/2012, 08:37 AM   #139
Hiddos
High-roller
 
Hiddos's Avatar
 
Join Date: Sep 2008
Posts: 3,944
Reputation: 1903
Default Re: rCmd.inc - Easiest way to create commands!

Is optional parameters a feature which is going to be implemented soon?
__________________
Don't PM me.
Quote:
Originally Posted by DeWolf View Post
For fuck's sake people, this whole thread is fucked up now.
Hiddos is offline   Reply With Quote
Old 14/10/2012, 12:09 PM   #140
Erdbeerpudding
Little Clucker
 
Join Date: Jan 2010
Location: Germany
Posts: 13
Reputation: 0
Default Re: rCmd.inc - Easiest way to create commands!

Is there any way to put a "z" for optional string?
Erdbeerpudding is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] IntroZones - The Easiest way to create gang zones. Version 1.0 introzen Filterscripts 66 20/11/2014 12:07 AM
How to create more commands in one fs wumpyc Scripting Help 9 29/09/2011 01:57 PM
How to create commands /myrank Noredine Help Archive 31 25/03/2010 10:13 AM
rcmd, like dcmd but for rcon commands! Daren_Jacobson Help Archive 4 02/03/2009 10:02 PM


All times are GMT. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.