[Include] rCmd.inc - Easiest way to create commands!
#61

Very good and useful rCmd
Reply
#62

Quote:
Originally Posted by SampLoverNo123
Посмотреть сообщение
Nice but Zcmd is still better then your one.
And why is that?
Reply
#63

well, i agree to him, cuz i changed ALL my commands to rCmd but NONE of them work anymore, for example this one: if there is something wrong then please tell me cuz i really like this style it only doesnt works
pawn Код:
rCmd[sui]->ls(playerid, success, string[128], pName[MAX_PLAYER_NAME], veh)
{
    if(!IsPlayerInAnyVehicle(playerid)){
        SetPlayerPos(playerid, 1607.6703,-1721.9176,13.5469);
        SetPlayerFacingAngle(playerid, 0.0);
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{FF0000}(/ls) {FFFF00}Player {FF0000}%s {FFFF00}has Teleported to {FF0000}Los Santos",pName);
        SetTimerEx("Unfreeze", 2000, 0, "d", playerid);
        GameTextForPlayer(playerid,"~g~Waiting for the Objects to load",2000,3);
        SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
    }
    else{
        veh = GetPlayerVehicleID(playerid);
        SetVehiclePos(veh, 1607.6703,-1721.9176,13.5469);
        SetVehicleZAngle(veh, 0.0);
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{FF0000}(/ls) {FFFF00}Player {FF0000}%s {FFFF00}has Teleported to {FF0000}Los Santos",pName);
        SetTimerEx("Unfreeze", 2000, 0, "d", playerid);
        SendClientMessageToAll(playerid, string);
        GameTextForPlayer(playerid,"~g~Waiting for the Objects to load",2000,3);
        LinkVehicleToInterior(veh, 0);
        SetVehicleVirtualWorld(veh, 0);
        PutPlayerInVehicle(playerid, veh, 0);
    }
    return SendClientMessage(playerid, 0xFF0000FF, "you have gone to Los Santos");
}
its same with all other commands, they DONT work, but is it like you said cuz i didnt use the success thingy? or isnt it that?
Reply
#64

very nice job!
Reply
#65

Quote:
Originally Posted by niels44
Посмотреть сообщение
well, i agree to him, cuz i changed ALL my commands to rCmd but NONE of them work anymore, for example this one: if there is something wrong then please tell me cuz i really like this style it only doesnt works
pawn Код:
// CODE
its same with all other commands, they DONT work, but is it like you said cuz i didnt use the success thingy? or isnt it that?
1- If you have any other command system, remove it.
2- Get a rid of OnPlayerCommandText.
3- Don't randomly add variables to the command parameters.
4- Don't use success if the command has no params. See example (/time) first post.
5- Specifier "u" does not return a string but an integer with the user ID.
Reply
#66

i know it does a integer with username, but i thought the playerid and success were default params or wutever its called, so i mean i thought i couldnt remove playerid and succes and then replace it with playerpos and floats and wutever, so if i understand it good now then you mean the PLAYERID is only default, the success and all others are optionally params or wutever its called? in that case i will remove all the SUCCESSes and check if it works

if i didnt get it right pls tell me
Reply
#67

If the command has no parameters, ONLY use playerid and nothing else.
Reply
#68

ah okay , also i always wanted to know what the params[] in zcmd is good for.. i neveru sed it.. could you tell me, also is sscanf still needed for this include, cuz as i saw at the examples from you i dont think it will be needed anymore...
Reply
#69

Very nice.
Reply
#70

Quote:
Originally Posted by YJIET
View Post
I think this would be way better if you combined it with sscanf to support optional parameters, arrays etc.
Amazing but this^^
Reply
#71

I have a problem with rCMD.

All commands does not work.

Edit: rCMD v0.1.2 Bug ?
Reply
#72

Interesting, any speed test?
Reply
#73

Woah Nice a new way to make commands now
Reply
#74

Using it for some days now, simply brilliant! Great work, keep it up ^^.

Also, like stated before, an 'optional' parameter would be great too.

Edit: Possibly using INVALID_PLAYER_ID if the player entered a player ID that isn't connected?
Reply
#75

Why my command dosn't work in sever?? 'Server unknown command...'
Reply
#76

Very nice, only just saw this include. Excellent way of making commands. Takes the ache out of ball-ache!

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Also, like stated before, an 'optional' parameter would be great too.
If or when this is added i will be switching over to this completely.
Reply
#77

Thanks!

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Using it for some days now, simply brilliant! Great work, keep it up ^^.

Also, like stated before, an 'optional' parameter would be great too.

Edit: Possibly using INVALID_PLAYER_ID if the player entered a player ID that isn't connected?
Quote:
Originally Posted by iggy1
Посмотреть сообщение
Very nice, only just saw this include. Excellent way of making commands. Takes the ache out of ball-ache!
If or when this is added i will be switching over to this completely.
Glad to hear that! Will be adding INVALID_PLAYER_ID for not connected players in the next update with the optional parameters.

Quote:
Originally Posted by Mr.R
Посмотреть сообщение
Why my command dosn't work in sever?? 'Server unknown command...'
Make sure to check this out:
Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
1- If you have any other command system, remove it.
2- Get a rid of OnPlayerCommandText.
3- Don't randomly add variables to the command parameters.
4- Don't use success if the command has no params. See example (/time) first post.
5- Specifier "u" does not return a string but an integer with the user ID.
Reply
#78

#edit:
It's working.

Nice include
Reply
#79

Sorry but I have just tried this and it doesn't work, I have just tried to make the typical /kill command with this:

pawn Code:
rCmd[]->kill(playerid)
{
    SetPlayerHealth(playerid, 0.0);
    return 1;
}
and I get "SERVER: Unknown command."
Reply
#80

Quote:
Originally Posted by Gryphus One
View Post
Sorry but I have just tried this and it doesn't work, I have just tried to make the typical /kill command with this:

pawn Code:
rCmd[]->kill(playerid)
{
    SetPlayerHealth(playerid, 0.0);
    return 1;
}
and I get "SERVER: Unknown command."
I have the same
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)