Csináltam egy olyat,hogy ha beirjuk,hogy /sziréna bejön egy dialog és az admin tud rakni a kocsira szirénát de le is tudja venni..
Script:
#include <a_samp>
#include ladmin
#define hiba 0xFF0000AA
public OnFilterScriptInit()
{
print(\"\\n************************************\");
print(\" Sziréna Betöltve \");
print(\"************************************\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"\\n***************************************\");
print(\" Sziréna Kikapcsolva \");
print(\"***************************************\\n\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/sziréna\", true)==0)
{
if(IsPlayerLuxAdmin(playerid))
{
ShowPlayerDialog(playerid, 8899, DIALOG_STYLE_LIST, \"Sziréna System By Yakuza\", \"Sziréna\\nSziréna törlése\", \"Kiválaszt\", \"Kilépés\");
}
else
{
SendClientMessage(playerid, hiba, \"Nem vagy rendszervezet tagja!\");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 8899)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, \"Status\", 1);
SetPVarInt(playerid, \"undercover\", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, \"undercover1\", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, \"undercover\"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, \"undercover1\"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0x00FFFFAA, \"Sziréna felrakva!\");
}
if(listitem == 1)
{
DestroyObject(GetPVarInt(playerid, \"undercover\"));
DeletePVar(playerid, \"Status\");
DestroyObject(GetPVarInt(playerid, \"undercover1\"));
DeletePVar(playerid, \"Status\");
}
}
}
return 0;
}
Civil is tudja használni:
#include <a_samp>
#include ladmin
#define hiba 0xFF0000AA
public OnFilterScriptInit()
{
print(\"\\n************************************\");
print(\" Sziréna Betöltve \");
print(\"************************************\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"\\n***************************************\");
print(\" Sziréna Kikapcsolva \");
print(\"***************************************\\n\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/sziréna\", true)==0)
ShowPlayerDialog(playerid, 8899, DIALOG_STYLE_LIST, \"Sziréna System By Yakuza\", \"Sziréna\\nSziréna törlése\", \"Kiválaszt\", \"Kilépés\");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 8899)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, \"Status\", 1);
SetPVarInt(playerid, \"undercover\", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, \"undercover1\", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, \"undercover\"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, \"undercover1\"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
SendClientMessage(playerid, 0x00FFFFAA, \"Sziréna felrakva!\");
}
if(listitem == 1)
{
DestroyObject(GetPVarInt(playerid, \"undercover\"));
DeletePVar(playerid, \"Status\");
DestroyObject(GetPVarInt(playerid, \"undercover1\"));
DeletePVar(playerid, \"Status\");
}
}
}
return 0;
}
Valakinek jól jöhet
Edit:
ladmin.inchttp://solidfiles.com/d/bc5089d7c9/