16.05.2018, 17:46
I code this code for Cops in my server. And I do not know how to make this code a part. As I typed this command it will appear on the [Fatty Key and it will automatically load [5, 4, 3, 2, 1] . It is the same as when you type the [server maintenance] command, it will show the letters and numbers.
PHP код:
CMD:ffind(playerid, params[])
{
if(PlayerInfo[playerid][pDuty] && IsACop(playerid))
{
//SendClientMessageEx(playerid, COLOR_RED, "* Listing all gates within 5 meters of you...");
for(new i, Float: fGatePos[3], gateid, string[128], szMessage[32]; i < MAX_GATES; i++)
{
if(sscanf(params, "i", gateid))
GetDynamicObjectPos(GateInfo[i][gGATE], fGatePos[0], fGatePos[1], fGatePos[2]);
if(IsPlayerInRangeOfPoint(playerid, 5, fGatePos[0], fGatePos[1], fGatePos[2]))
{
if(GateInfo[i][gModel] != 0)
{
//format(szMessage, sizeof(szMessage), "Gate ID %d (VW: %d)", i, GateInfo[i][gVW]);
SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
//format(string,sizeof(string),"|___________ Password Gate (ID: %d) ___________|", gateid);
//format(string, sizeof(string), "PassWord Gate: %s", GateInfo[i][gPass]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Ban khong phai la nhan vien nha nuoc.");
}
return 1;
}