Hi Leute...
Da ich und ein Kumpel von mir einen Server machen,
wollen wir natürlich auch einen eigenen Gamemode etc.
Nun hab ich mal in so ein Tutorial reingeschaut und es mal Probiert.
Hier der Code:
main()
{
print("\n----------------------------------");
print(" Gamemod by Joshi");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Deathmatch");
UsePlayerPedAnims();
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1449.8280,-2287.5422,13.5469);
SetPlayerCameraPos(playerid, 1446.0238,-2287.4514,13.5469);
SetPlayerCameraLookAt(playerid, 1449.8280,-2287.5422,13.5469);
SetPlayerFacingAngle(playerid, 90.0);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,0xFF66FFAA,"Willkommen auf dem [HotS]Clanserver");
new string[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s hat den Server betreten", name);
SendClientMessageToAll(rot, string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid==INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); }
else {
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1); }
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;
}
return 0;
}
Da ich ein totaler Anfängerim Thema Gta Scripten bin weiss ich jetzt nicht was der Fehler ist...
Bitte um hilfe,
Achja hier die Errors
Zitat
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(4) : error 017: undefined symbol "print"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(5) : error 017: undefined symbol "print"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(6) : error 017: undefined symbol "print"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(11) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(13) : error 017: undefined symbol "SetGameModeText"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(14) : error 017: undefined symbol "UsePlayerPedAnims"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(15) : error 017: undefined symbol "AddPlayerClass"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(19) : warning 235: public function lacks forward declaration (symbol "OnGameModeExit")
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(24) : warning 235: public function lacks forward declaration (symbol "OnPlayerRequestClass")
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(26) : error 017: undefined symbol "SetPlayerPos"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(27) : error 017: undefined symbol "SetPlayerCameraPos"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(28) : error 017: undefined symbol "SetPlayerCameraLookAt"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(29) : error 017: undefined symbol "SetPlayerFacingAngle"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(33) : warning 235: public function lacks forward declaration (symbol "OnPlayerRequestSpawn")
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(38) : warning 235: public function lacks forward declaration (symbol "OnPlayerConnect")
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(40) : error 017: undefined symbol "SendClientMessage"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(43) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(43) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(43) : error 036: empty statement
C:\Users\Joshua\Desktop\HotS clanserver\gamemodes\hots.pwn(43) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
15 Errors.
Alles anzeigen