Functions on cmd 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: Functions on cmd not working (
/showthread.php?tid=449456)
Functions on cmd not working -
San1 - 08.07.2013
Scroll Right and see the problem..
pawn Код:
CMD:onduty(playerid, params[])
{
if(PlayerInfo[playerid][pJob] != JOB_TAXI && PlayerInfo[playerid][pVIPJob] != JOB_TAXI) return SendClientMessage(playerid, COLOR_GREY, "You are not a taxi driver.");
{
if(PlayerInfo[playerid][pTaxDuty] == 1) return SendClientMessage(playerid, COLOR_WHITE, "You cant go on duty twice use(/offduty)");
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); // This dont show either
if(!IsTaxiVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_GREY, "You must be in an taxi vehicle to use this command."); // This MSG not showing which means i can do the cmd anywhere
foreach(Player, i)
{
if(IsPlayerLoggedIn(i))
{
format(string, sizeof(string), "TaxiAd: Taxi driver %s has went on-duty as a taxi driver. If you need a taxi call the company. ((/service taxi)) ", RPN(playerid));
SendClientMessage(i, TEAM_GROVE_COLOR, string);
format(string, sizeof(string), "Anyone enters your taxi car after arriving to the place they want, request the money by Roleplaying.");
SendClientMessage(playerid, COLOR_YELLOW, string);
SetPlayerColor(playerid, TCOLOR_YELLOW);
PlayerInfo[playerid][pTaxDuty] = 1;
}
}
}
return 1;
}
Re: Functions on cmd not working -
[MG]Dimi - 08.07.2013
show us stock of IsPlayerLoggedIn and IsTaxiVehicle
Re: Functions on cmd not working -
ReVo_ - 08.07.2013
What is your problem ?
post what [MG]Dimi said.
Anyway, next time be more specific (i see now your code comments but i dont understand all really.)