Command through ZCMD not working - 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: Command through ZCMD not working (
/showthread.php?tid=325816)
Command through ZCMD not working -
NewerthRoleplay - 14.03.2012
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.
Re: Command through ZCMD not working -
Unknownich - 14.03.2012
Try this
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10,-1547.7715,123.7701,3.5547))
Re: Command through ZCMD not working -
SimonItaly - 14.03.2012
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.
Re: Command through ZCMD not working -
NewerthRoleplay - 14.03.2012
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>
Re: Command through ZCMD not working -
Twisted_Insane - 14.03.2012
Type "return 1;" before reaching the last bracket!
Re: Command through ZCMD not working -
NewerthRoleplay - 14.03.2012
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
Re: Command through ZCMD not working -
Alexy_Dramon - 17.03.2012
Quote:
if(!IsPlayerInRangeOfPoint(playerid, -1547.7715,123.7701,3.5547,309.2723))
|
ty this