JO
Ich habe mir für meinen neuen Server ein System überlegt mit Teams anstelle von aufwendigen variablen, die ich niemals begreifte (irgendwann soll es ein reallive serverwerden.) aber ich stoße nur auf Errors und komme nicht weiter. das Thema wird nicht zu lang:
Errors:
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(510) : error 054: unmatched closing brace ("}")
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(511) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(514) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(516) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(520) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(524) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(526) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(534) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(536) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(538) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(542) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(546) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(548) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(556) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(559) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(561) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(565) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(569) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(571) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto San Andreas\gamemodes\Eigener.pwn(580) : error 010: invalid function or declaration
Alles anzeigen
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_GREEN,"Du bist eingestiegen");
new vid; //vehicle-id
new vty; //vehicle-type
new pte; //player-team
new WP; //Wanteds
vid= GetPlayerVehicleID(playerid); //definition vid
vty= GetVehicleModel(vid); //definition vty
pte=GetPlayerTeam(playerid); //definition pte
WP=GetPlayerWantedLevel(playerid); //definition WP
if (vty==523||vty==596||vty==430||vty==528||vty==597||vty==598||vty==599||vty==601) //PD-Cars
{//PD-Cars
if(pte ==2) //is player from team police
{
SendClientMessage(playerid,COLOR_GREEN,"U are allowed t drive"); //send message
}
else //is player no officer
{
RemovePlayerFromVehicle(playerid); //kick player from car
SendClientMessage(playerid,COLOR_RED,"U arent allowed to drive PD-cars"); //send message
if (WP==0) //if he has no wantedlevel
{
if (pte==1) //and he is zivilist (zivilists are team1)
{
SetPlayerWantedLevel(playerid,1);}}} //give 1WP
}
}
}
}
else
{
//PD/FBI-Cars
if (vty==427||vty==497)//cars for both teams
{
if(pte ==2||3) //if player is officer or agent
{
SendClientMessage(playerid,COLOR_GREEN,"U are allowed t drive"); //send message
}
else //is player no officer/agent
{
RemovePlayerFromVehicle(playerid); //kick from car
SendClientMessage(playerid,COLOR_RED,"U arent allowed to drive PD-cars"); //send message
if (WP==0) //if he has no wantedlevel
{
if (pte==1) //if he is zivilist
{
SetPlayerWantedLevel(playerid,1);}}} //give 1WP
}
}
}
}
}
else
{//FBI cars
if (vty==490)
{
if(pte ==3)//if player is agent
{
SendClientMessage(playerid,COLOR_GREEN,"U are allowed t drive"); //send message
}
else //he is not agent
{
RemovePlayerFromVehicle(playerid);//kick from car
SendClientMessage(playerid,COLOR_RED,"U arent allowed to drive FBI-cars"); //send message
if (WP==0) //if he has no wantedlevel
{
if (pte==1) //the player is zivilist
{
SetPlayerWantedLevel(playerid,1);//give 1WP
}
}
}
}
}
else
{
//Army
if (vty==425||vty==432||vty==433||vty==470||vty==548)//army cars
{
if(pte ==4)//player is soldier
{
SendClientMessage(playerid,COLOR_GREEN,"U are allowed t drive");//send message
}
else //player is not soldier
{
RemovePlayerFromVehicle(playerid);//kick from car
SendClientMessage(playerid,COLOR_RED,"Du bist kein Polizist");//send message
if (WP==0)//if he has no wantedlevel
{
if (pte==1)//the player is zivilist
{
SetPlayerWantedLevel(playerid,1);}//give 1WP
}
}
}
}
}
}
return 1;
}
Ich hoffe und glaube, ihr könnt mir helfen. Ich wäre euch MEGA dankbar.