1. Problem:
3dtextlabels werden nicht gelöscht:
if(PlayerInfo[playerid][pAdmin] == 1)//fagt ab ob er Adminlevel 1 ist müsst ihr an Script anpassen ^^
{
new GMTEXT[MAX_PLAYER_NAME]; //ist halt das new für den 3D text
GMTEXT = "Moderator"; // sagt was der 3DText für ein Text haben soll
GM3D[playerid] = Create3DTextLabel(GMTEXT,COLOR_MODBLUE,0,0,0,30.0,1); //erstellt das neue 3Dtext label , farbe zur not anpassen
Attach3DTextLabelToPlayer(GM3D[playerid], playerid, 0.0, 0.0, 0.45); // hängt es an den spieler dran
}
else if(PlayerInfo[playerid][pAdmin] == 2)//fragt ab ob er Adminlevel 2 ist Script muss angepasst werden
{
new GMTEXT[MAX_PLAYER_NAME]; //gleiche wie oben
GMTEXT = "Super-Moderator";//gleiche wie oben
GM3D[playerid] = Create3DTextLabel(GMTEXT,COLOR_MODBLUE,0,0,0,30.0,1);//gleiche wie oben
Attach3DTextLabelToPlayer(GM3D[playerid], playerid, 0.0, 0.0, 0.45);//gleiche wie oben
}
usw.
Bei onplayerdisconnect:
Delete3DTextLabel(GM3D[playerid]);//löscht das 3dtextlabel
wieso löscht der die net?
2. Problem..:
Wenn man kein Cop ist wird man nicht ausm auto geschmissen:
dies hab ich:
new CopCar[38]; // Zahl ändern!
public IsACopCar(carid)
{
for(new i = 0; i < sizeof(CopCar); i++)
{
if(carid == CopCar[i])
{
return 1;
}
}
return 0;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
else if(IsACopCar(newcar))
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 ){ }//Fraktions Ids könnt ihr auch unten wie bei den beispiel machen
else
{
RemovePlayerFromVehicle(playerid);
return 1;
}
}
Ongamemodeinit:
CopCar[0]= AddStaticVehicle(497,-1676.6909,712.1545,30.7782,269.6934,0,1); // sf heli 1
CopCar[1]= AddStaticVehicle(497,-1676.5270,699.8519,30.7782,269.1807,0,1); // sf heli2
CopCar[2]= AddStaticVehicle(601,-1623.4092,649.3776,-5.4837,89.5186,0,1); // spritze 1
CopCar[3]= AddStaticVehicle(528,-1640.0264,649.7460,-5.1972,270.2427,0,1); // tank 1
CopCar[4]= AddStaticVehicle(601,-1623.1870,653.7153,-5.4834,88.8438,0,1); // spritze 2
CopCar[5]= AddStaticVehicle(528,-1640.0371,653.8900,-5.1975,269.8074,0,1); // tank 2
CopCar[6]= AddStaticVehicle(599,-1616.5688,732.2340,-5.0504,359.6032,0,1); // ranger 1
CopCar[7]= AddStaticVehicle(599,-1612.9281,731.5094,-5.0512,0.3569,0,1); // ranger 2
CopCar[8]= AddStaticVehicle(597,-1616.5963,748.7743,-5.4736,180.0533,0,1); // police 1
CopCar[9]= AddStaticVehicle(597,-1612.4529,748.7443,-5.4740,180.0297,0,1); // police 2
CopCar[10]= AddStaticVehicle(597,-1608.5807,748.9258,-5.4729,181.0740,0,1); // police 3
CopCar[11]= AddStaticVehicle(523,-1592.4868,706.0534,-5.6715,327.3725,0,1); // motor 1
CopCar[12]= AddStaticVehicle(523,-1590.8335,705.1049,-5.6678,317.8932,0,1); // motor 2
CopCar[13]= AddStaticVehicle(523,-1588.5435,704.9459,-5.6645,324.9074,0,1); // motor 3
CopCar[14]= AddStaticVehicle(523,-1592.9642,705.3075,-5.6704,327.3724,0,1); // motor 0
CopCar[15]= AddStaticVehicle(427,1526.8040,-1645.2378,6.0225,180.1777,0,1); // LSPDenf
CopCar[16]= AddStaticVehicle(427,1530.6295,-1645.1561,6.0226,180.9305,0,1); // LSPDenf
CopCar[17]= AddStaticVehicle(427,1534.6031,-1645.0212,6.0225,181.4529,0,1); // LSPDEnforc
CopCar[18]= AddStaticVehicle(427,1538.6747,-1644.8713,6.0247,182.2266,0,1); // lspdenfor
CopCar[19]= AddStaticVehicle(599,1558.8527,-1710.3196,6.0789,0.2289,0,1); // LSPDRancher
CopCar[20]= AddStaticVehicle(601,1564.8849,-1709.7466,5.6494,333.0285,0,1); // Wasserwerfer
CopCar[21]= AddStaticVehicle(596,1570.3167,-1709.4863,5.6118,1.9558,0,1); // LSPD
CopCar[22]= AddStaticVehicle(596,1574.4641,-1709.4738,5.6112,359.8345,0,1); // LSPD
CopCar[23]= AddStaticVehicle(596,1578.7756,-1709.6188,5.6118,0.8803,0,1); // LSPD
CopCar[24]= AddStaticVehicle(599,1583.5287,-1709.7101,6.0792,358.6688,0,1); // LSPD
CopCar[25]= AddStaticVehicle(599,1587.6195,-1709.7272,6.0829,2.0047,0,1); // LSPD
CopCar[26]= AddStaticVehicle(601,1593.4230,-1710.3311,5.6494,318.5876,0,1); // Wasserwerfer
CopCar[27]= AddStaticVehicle(523,1603.9866,-1710.1903,5.4643,55.0181,0,1); // Bike
CopCar[28]= AddStaticVehicle(523,1602.9913,-1711.9707,5.4603,57.7238,0,1); // Bike
CopCar[29]= AddStaticVehicle(523,1601.2034,-1713.0629,5.4596,21.9783,0,1); // bike
CopCar[30]= AddStaticVehicle(523,1599.2734,-1713.2079,5.4604,4.1978,0,1); // Bike
CopCar[31]= AddStaticVehicle(596,1586.0958,-1667.7905,5.6119,270.6534,0,1); // LSPD
CopCar[32]= AddStaticVehicle(596,1586.0526,-1671.5160,5.6141,270.5114,0,1); // LSPD
CopCar[33]= AddStaticVehicle(599,1600.5248,-1700.1803,6.0778,91.2639,0,1); // rancher
CopCar[34]= AddStaticVehicle(599,1600.4611,-1696.0944,6.0793,91.0152,0,1); // Rancher
CopCar[35]= AddStaticVehicle(599,1600.5719,-1692.1035,6.0788,90.3121,0,1); // Rancher
CopCar[36]= AddStaticVehicle(596,1528.8552,-1683.8950,5.6114,270.5047,0,1); // LSPD
CopCar[37]= AddStaticVehicle(596,1528.7667,-1687.8878,5.6111,268.4010,0,1); // LSPD
Wieso wieso wieso??