[Help] I need help with the script -
BanhVo - 06.10.2018
I want something in my script that can improve it. I need to have the time between the screen from number 3 back to zero and it will appear what I am looking for. And it will automatically open the port when the password has been found.
Please help me . I started to learn the script. Sorry my language is not good.
This is my scenario.
Код:
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;
}
Re: [Help] I need help with the script -
Vennox - 06.10.2018
i really don't understand what you want, but here is an improved verison of your script:
PHP код:
CMD:ffind(playerid, params[]){
if(PlayerInfo[playerid][pDuty] == 0 || !IsACop(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Ban khong phai la nhan vien nha nuoc.");
{
SendClientMessageEx(playerid, COLOR_RED, "* Listing all gates within 5 meters of you...");
new string[128], szMessage[32], Float:fGatePos[3];
for(new i; i < MAX_GATES; i++){
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) ___________|", i);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "PassWord Gate: %s", GateInfo[i][gPass]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
}
}
}
return 1;
}
i removed that gateid think. your command dosen't require sscanf. i also created the variabiles string[128], szMessage[32], Float:fGatePos[3] before the loop, it didn't make any sense defining them repeatedly
Re: [Help] I need help with the script -
BanhVo - 06.10.2018
But it is not really what I want. I want when I enter [/ ffind] it will appear [port ID] [password:

?]
and the gas has [Password] it will automatically open the gate. Currently my server uses the command to open port [/ movegate pawssword].
And I need a good one for it, or I want it to have time like server maintenance and it has a time point in the middle of the screen.
Re: [Help] I need help with the script -
Undef1ned - 06.10.2018
Explain, I don't understand anything you ask.
Edit: When using the command tell you this: "/ ffind [port ID] [password]"?