Sziasztok!
Lenne itt nekem egy kis szkriptem.
#include <a_samp>
#include <fixchars>
#include <streamer>
#define COLOR_CHARTREUSE 0x7FFF00AA
new Menu:tele;
#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
public OnFilterScriptInit()
{
print(\"\\n---------------------------------\");
print(\"Menü\");
print(\"---------------------------------\\n\");
tele = CreateMenu(\"~r~Menü\", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(tele, 0, \"TESTÕR\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnGameModeInit()
{
CreateDynamic3DTextLabel(\"Testõr HQ\", 0x33AA33AA, -1959.8640,301.5093,35, 250.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 50.0);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/menu\", cmdtext, true, 10) == 0)
{
ShowMenuForPlayer(tele, playerid);
TogglePlayerControllable(playerid, false);
return 1;
}
return 0;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Current = GetPlayerMenu(playerid);
if(Current == tele)
{
switch(row)
{
case 0:
{
{
SetPlayerFacingAngle(playerid, 357.7125);
SetPlayerPos(playerid, -1959.864, 301.5093, 35.47393);
HideMenuForPlayer(tele, playerid);
TogglePlayerControllable(playerid, true);
SetPlayerSkin(playerid,164);
new string[256];
new pName[30];
GetPlayerName(playerid, pName, 30);
format(string, 280,\"%s Testõrként dolgozik\", pName);
GivePlayerWeapon(playerid,23,200);
SendClientMessage(playerid, COLOR_GREEN, \"Kaptál egy Hangtompítós 9 MM-est 200 db lõszerrel, de ne élj vissza vele!\");
SendClientMessageToAll(COLOR_CHARTREUSE, string);
}
}
}
}
return 1;
}
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, true);
return 1;
}
0 warning 0 error
A fegyvert mégsem adja oda a játékosnak, ha kiválasztja a testõrt. Mit tegyek? :/