Command help -
[bs]_lancer - 25.07.2011
small help..
i have this cmd
pawn Код:
CMD:rob(playerid, params[])
{
new userid, string[128], targetsname[MAX_PLAYER_NAME], money, muggersname[MAX_PLAYER_NAME];
if (sscanf(params, "u", userid)) SendClientMessage(playerid, COLOR_WHITE, "SYNTAX - /mask [playerid]");
else
{
if(IsPlayerConnected(userid))
{
GetPlayerMoney(userid);
if(GetDistanceBetweenPlayers(playerid, userid) > 3)
{
SendClientMessage(playerid, COLOR_WHITE, "You're not close enough.");
return 1;
}
if(money < 0)
{
SendClientMessage(playerid, COLOR_WHITE, "That player doesn't have enough money to rob from. (0)");
return 1;
}
GetPlayerName(playerid, muggersname, sizeof(muggersname));
GetPlayerName(userid, targetsname, sizeof(targetsname));
format(string, sizeof(string), "You have robbed $%d, from %s.", money, targetsname);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "You have been 'mugged'! You have lost $%d, %s stole it.", money, muggersname);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerMoney(playerid, money);
}
}
return 1;
}
and i got this error cuz of it
pawn Код:
undefined symbol "GetDistanceBetweenPlayers"
i've tried to do
new GetDistanceBetweenPlayers;
but i got another error
so can i get this cmd fixed OR if i can change it to ZCMD
if u can do it for me with ZCMD will be better

ty
Re: Command help -
Horrible - 25.07.2011
GetDistanceBetweenPlayers
Returns the distance between players as an integer
Important Note: This function is no longer useable
Parameters:
(playerid,playerid2)
playerid The first playerid to parse into the function
playerid2 The second playerid to parse into the function
Returns The distance between the players in meters as an integer
GetDistanceBetweenPlayers(1,2);
By: Slick
i search at wiki
https://sampwiki.blast.hk/wiki/Useful_Fu...BetweenPlayers
Re: Command help -
[bs]_lancer - 25.07.2011

so i cant use it !!
well fok GetDistanceBetweenPlayers :P
anyway .. can u make the cmd for me with ZCMD ! i want it
Re: Command help -
Horrible - 25.07.2011
Quote:
Originally Posted by [bs]_lancer
 so i cant use it !!
well fok GetDistanceBetweenPlayers :P
anyway .. can u make the cmd for me with ZCMD ! i want it
|
LOL u already use ZCMD
Re: Command help -
[bs]_lancer - 25.07.2011
OOH FUCK !!
i gave ya the wrong cmd :P my bad xD
the cmd start with
dcmd_rob(playerid, params[])
and when i compile i get that error i told u about
so ..
i want it to start with
CMD:rob(playerid, params[])
got me
Re: Command help -
Horrible - 25.07.2011
Quote:
Originally Posted by [bs]_lancer
OOH FUCK !!
i gave ya the wrong cmd :P my bad xD
the cmd start with
dcmd_rob(playerid, params[])
and when i compile i get that error i told u about
so ..
i want it to start with
CMD:rob(playerid, params[])
got me 
|
on top #include <zcmd>
download
http://forum.sa-mp.com/showthread.ph...t=include+zcmd
Re: Command help -
[bs]_lancer - 25.07.2011
small question ...
if i used ZCMD i cant use the normal cmdtext ?!!
i added 2 cmds with ZCMD and i have like 10 commands with normal cmdtext.
but they wont work !!!! just ZCMD commands are working !!!
so .. whats wrong 0.o!
Re: Command help -
Horrible - 25.07.2011
if u use both
strcmp and dcmd will not works
just change it to ZCMD is easy
Re: Command help -
[bs]_lancer - 25.07.2011
daaam will be hard to change all my commands to ZCMD !! i will get errors as hell cuz some of them used to be srcmp !
Re: Command help -
Horrible - 25.07.2011
PM me ur code and i will change it to zcmd but cant now