07.03.2013, 07:07
I tried creating command to help SAPD Faction onduty without lockers.
This is my Script:
But it's not work. 3 Error line:
Can you help me fix this error?
This is my Script:
Код:
CMD:badge(playerid, params[]) { new string[128], string2[64]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(IsACop(playerid)) { if(!PlayerInfo[playerid][pFacDuty]) { PlayerInfo[playerid][pFacDuty] = 1; SetPlayerColor(playerid, TRANSPARENT_BLUE); format(string, sizeof(string), "* %s grabs their badge, gun and mp5 from the locker.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); GiveZaiatWeapon(playerid, 29, 500); GiveZaiatWeapon(playerid, 24, 200); SetPlayerArmour(playerid, 100); return 1; } else { PlayerInfo[playerid][pFacDuty] = 0; SetPlayerColor(playerid, TRANSPARENT_WHITE); SetPlayerArmour(playerid, 0); format(string, sizeof(string), "* %s places their badge in the locker.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); return 1; } } }
Quote:
E:\***(1255 ![]() E:***(12558 -- 12583) : warning 209: function "cmd_badge" should return a value E:\***(23723) : warning 203: symbol is never used: "badge" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings. |