Quick help. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Quick help. (
/showthread.php?tid=74475)
Quick help. -
-eXo - 22.04.2009
Could someone fix this? I want someone to only be able to use this command if they are apart of faction 5 and at certain cords.
Код:
if(strcmp(cmd, "/yakgun", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember]== 5 ||PlayerInfo[playerid][pLeader] == 5 )
{
if(!PlayerToPoint(3.0, playerid, 1202.4243,-986.2501,43.4766))
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* Yakuza member %s has taken weapons from Yakuza HQ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 24, 60);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* Yakuza member %s has put weapons back in Yakuza HQ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 24, -61);
OnDuty[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not at the Yakuza HQ!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not a member of Yakuza!");
}
}
return 1;
}
Re: Quick help. -
Bujhm - 23.04.2009
Good!
Re: Quick help. -
CamelJoe - 23.04.2009
maybe say the problem? what i need to divine? say what the problem of the code, error, dont word.
Re: Quick help. -
-eXo - 23.04.2009
They can do the command from anywhere and I'm trying to make it they have to be in those cords.
Re: Quick help. -
lavamike - 23.04.2009
if(
!PlayerToPoint(3.0, playerid, 1202.4243,-986.2501,43.4766))
! means not so your saying if they are not in those coords they can do it
change it to this..
if(PlayerToPoint(3.0, playerid, 1202.4243,-986.2501,43.4766))
Re: Quick help. -
miokie - 23.04.2009
Im guessing this is for the GF script?
Ask in that topic.