Command through ZCMD not working
#1

hey just made my command to join a job, only done one atm but i cannot use the command ingame, i think i may have made an error in the code somewhere :/

pawn Код:
CMD:acceptjob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, -1547.7715,123.7701,3.5547,309.2723))
    {
        pJob[playerid] = TRUCKER;
        SendClientMessage(playerid, COLOR_WHITE, ".:: You have now joined the job, Trucker ::.");
        SendClientMessage(playerid, COLOR_WHITE, ".:: To start work grab a truck and use /startjob ::.");
    }
}
As you can see is basically it just checks if the player is in a specific location and it'll make there job as a Trucker but the server isnt recognising it as a command.
Reply
#2

Try this
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10,-1547.7715,123.7701,3.5547))
Reply
#3

You've also to "return 1" in every CMD function, or it will be executed, but you'll get an "unknown command" by the server.
Reply
#4

Quote:
Originally Posted by Unknownich
Посмотреть сообщение
Try this
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10,-1547.7715,123.7701,3.5547))
Dosn't work the server is not recognising the command no matter what.

oh and all the includes are here:
pawn Код:
#include <a_samp>
#include <YSI\y_ini>
#include <zcmd>
#include <sscanf2>
#include <irc>
#include <foreach>
#include <streamer>
#include <DINI>
Reply
#5

Type "return 1;" before reaching the last bracket!
Reply
#6

Quote:
Originally Posted by DarkSlyder
Посмотреть сообщение
You've also to "return 1" in every CMD function, or it will be executed, but you'll get an "unknown command" by the server.
simplist thing...i feel so dumb :/ my first time coding in 3 months
Reply
#7

Quote:

if(!IsPlayerInRangeOfPoint(playerid, -1547.7715,123.7701,3.5547,309.2723))

ty this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)