Hallo liebes Breadfish-Team!
Ich finde eure Homepage einfach nur klasse. Ich habe heute Nachmittag mal angefangen und wollte einen eigenen Reallife Script schreiben, weil ich so fastziniert war, was man so alles scripten kann.
Ich wollte nur ein paar sehr simple /Befehle machen. Es hat soweit alles funktioniert, Pawno zeigt mir beim kompilen auch keine Fehler an. Wenn ich dann aber im Spiel bin und ein Befehl eingebe, sagt er mir, dass der Befehl nicht vorhanden sei. Ich hoffe mir kann einer helfen. Am besten kopier ich den Script mal hier rein:
#include <a_samp>
#pragma tabsize 0
new LSPDTOR1;
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/hilfe") == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Was für hilfe benötigen sie?
--- Für Cop-Hilfe: /cophelp ---");
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/cophelp") == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Diese funktion ist zurzei nicht verfügbar!");
return 1;
}
return 0;
if(strcmp(cmdtext, "/tele") == 0)
{
SetPlayerPos(playerid, 1584.9663, -1637.8287, 1.5);
return 1;
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
AddPlayerClass(0,1100.0643,-1521.3173,22.7531,315.6041,0,0,0,0,0,0); // Startposition^^
CreateVehicle(598,1538.7446,-1645.1675,5.6378,181.8028,0,1,60); // car
CreateVehicle(598,1534.6595,-1645.4438,5.6403,180.2336,0,1,60); // car
CreateVehicle(598,1530.5760,-1645.4602,5.6390,180.0868,0,1,60); // car
CreateVehicle(598,1526.3541,-1645.6262,5.6379,178.7975,0,1,60); // car
CreateVehicle(597,1600.8331,-1688.2510,5.6619,92.1872,0,1,60); // car
CreateVehicle(597,1600.9266,-1683.7548,5.6610,89.4100,0,1,60); // car
CreateVehicle(597,1535.6620,-1666.9712,13.1512,359.9171,0,1,60); // car
CreateVehicle(597,1536.0089,-1678.0043,13.1514,359.5722,0,1,60); // car
CreateVehicle(434,1373.0657,-1602.5680,13.5258,163.6789,4,4,60); // car
CreateVehicle(599,1544.3495,-1684.4238,6.0808,89.9178,0,1,60); // car
CreateVehicle(599,1544.6337,-1680.4945,6.0784,89.7154,0,1,60); // car
CreateVehicle(599,1544.2423,-1676.2256,6.0821,86.7627,0,1,60); // car
CreateVehicle(599,1543.9149,-1672.2999,6.0807,90.3080,0,1,60); // car
CreateVehicle(477,1226.4266,-911.2513,42.6586,100.6861,94,1,60); // car
CreateVehicle(477,1227.2057,-917.6014,42.6553,102.5194,94,1,60); // car
CreateVehicle(477,1103.4275,-1451.0471,15.5512,359.5660,94,1,60); // car
CreateVehicle(462,1120.6206,-1504.6086,15.3940,359.6743,70,36,60); // car
CreateVehicle(462,1120.6373,-1501.6648,15.3973,359.6744,70,36,60); // car
CreateVehicle(462,1120.6604,-1497.6105,15.3929,359.6743,70,36,60); // car
CreateVehicle(462,1120.6835,-1493.4872,15.3899,359.6743,70,36,60); // car
CreateVehicle(462,1120.7096,-1488.9174,15.3946,359.6743,70,36,60); // car
CreateVehicle(462,1120.7344,-1484.5632,15.3947,359.6743,70,36,60); // car
CreateVehicle(462,1120.7531,-1481.2797,15.3904,359.6742,70,36,60); // car
CreateVehicle(462,1120.7750,-1477.4310,15.3942,359.6742,70,36,60); // car
CreateVehicle(462,1120.7931,-1474.2445,15.3875,359.6738,70,36,60); // car
LSPDTOR1 = CreateObject(975, 1588.832520, -1637.869263, 14.129625, 0.0000, 0.0000, 0.0000); //lspd Gate
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/popen", cmdtext, true) == 0)
{
MoveObject(LSPDTOR1, 1584.9663, -1637.8287, 13.3905, -100);
return 1;
}
if (strcmp("/pclose", cmdtext, true) == 0)
{
MoveObject(LSPDTOR1, 1584.9663, -1637.8287, 13.3905, 1.0);
return 1;
}
return 0;
}
public OnPlayerInfoChange(playerid)
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
Ach ja, ich wünsche euch allen noch frohe Feiertage.
Mfg oki84