Hallo..
In meinem Script ist ein System, das man 25Punkte braucht, um nen Hunter zu fliegen. Das gleiche wollte ich mit nem Panzer auch machen,aber beim Compilen schmiert mein Pawno ab.. Hier der Teil vom Script:
Die Score for Tank:
#define ScoreForTank 50
Die Panzer:
Tank[0] = AddStaticVehicleEx(432,1937.6580,-2236.9517,13.5558,178.7957,105,205); // tank1
Tank[1] = AddStaticVehicleEx(432,1931.8048,-2237.0232,13.5558,177.5785,177,42); // tank2
Tank[2] = AddStaticVehicle(432,1925.3273,-2236.6772,13.5558,179.5924,22,196); // tank3
Und der Befehl:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(veh == hunter[0] veh == hunter[1] veh == hunter[2] veh == hunter[3])
{
if(GetPlayerScore(playerid) >= ScoreForHunter) { GameTextForPlayer(playerid,"~r~hunter",3000,1); }
else
{
new string[128];
RemovePlayerFromVehicle(playerid);
if(pLanguage[playerid] == ENGLISH)
{
format(string,sizeof string,"You need %d+ Score for the Hunter !",ScoreForHunter);
}
else if(pLanguage[playerid] == GERMAN)
{
format(string,sizeof string,"Du brauchst %d+ punkte für den Hunter !",ScoreForHunter);
}
else if(pLanguage[playerid] == TURKISH)
{
format(string,sizeof string,"Hunter'i kullanabilmen için %d+ Puan'a ihtiyacin var !",ScoreForHunter);
}
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
return 1;
}
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(veh == hunter[0] veh == hunter[1] veh == hunter[2] veh == hunter[3])
{
if(GetPlayerScore(playerid) >= ScoreForHunter) { GameTextForPlayer(playerid,"~r~hunter",3000,1); }
else
{
new string[128];
RemovePlayerFromVehicle(playerid);
if(pLanguage[playerid] == ENGLISH)
{
format(string,sizeof string,"You need %d+ Score for the Hunter !",ScoreForHunter);
}
else if(pLanguage[playerid] == GERMAN)
{
format(string,sizeof string,"Du brauchst %d+ punkte für den Hunter !",ScoreForHunter);
}
else if(pLanguage[playerid] == TURKISH)
{
format(string,sizeof string,"Hunter'i kullanabilmen için %d+ Puan'a ihtiyacin var !",ScoreForHunter);
}
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
return 1;
}
{
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(veh == Tank[0] veh == Tank[1] veh == Tank[2])
{
if(GetPlayerScore(playerid) >= ScoreForTank) { GameTextForPlayer(playerid,"~r~Tank",3000,1); }
else
{
new string[128];
RemovePlayerFromVehicle(playerid);
if(pLanguage[playerid] == ENGLISH)
{
format(string,sizeof string,"You need %d+ Score for the Tank !",ScoreForTank);
}
else if(pLanguage[playerid] == GERMAN)
{
format(string,sizeof string,"Du brauchst %d+ punkte für den Panzer !",ScoreForTank);
}
else if(pLanguage[playerid] == TURKISH)
{
format(string,sizeof string,"Tank'i kullanabilmen için %d+ Puan'a ihtiyacin var !",ScoreForTank);
}
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
return 1;
}
if(newstate == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
if(veh == Tank[0] veh == Tank[1] veh == Tank[2])
{
if(GetPlayerScore(playerid) >= ScoreForTank) { GameTextForPlayer(playerid,"~r~Tank",3000,1); }
else
{
new string[128];
RemovePlayerFromVehicle(playerid);
if(pLanguage[playerid] == ENGLISH)
{
format(string,sizeof string,"You need %d+ Score for the Tank !",ScoreForTank);
}
else if(pLanguage[playerid] == GERMAN)
{
format(string,sizeof string,"Du brauchst %d+ punkte für den Panzer !",ScoreForTank);
}
else if(pLanguage[playerid] == TURKISH)
{
format(string,sizeof string,"Tank'i kullanabilmen için %d+ Puan'a ihtiyacin var !",ScoreForTank);
}
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
return 1;
}
LG