hallo an alle
ich hab ein problem und zwar mache ich gerade ein fahrschul script mit theorie und praxis. theorie funzt aber die praxis buggt...
normaler weise sollte ein checkpoint erscheinen wen ich mit der theori fertig bin und in das fahrschul auto einsteige. nun steig ich ein und dann kommt für 2 millisekunden kurz der cp zum vorschein und verschwindet wieder....
heir der code von OnPlayerStateChange:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new getthecar;
getthecar = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(IsAFsAutoCar(getthecar))
{
if(praxis == 1)
{
SetPlayerCheckpoint(playerid,-2044.6627,-80.5275,34.7249,5.0);
SetPVarInt(playerid,"fscpid",fsautocp1);
if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp1)
{
SetPlayerCheckpoint(playerid,-2068.6460,-67.1663,34.7388, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp2);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp2)
{
SetPlayerCheckpoint(playerid,-2084.4258,-39.6488,34.8046, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp3);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp3)
{
SetPlayerCheckpoint(playerid,-2098.1326,33.0348,34.7386, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp4);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp4)
{
SetPlayerCheckpoint(playerid,-2170.4895,17.3659,34.7388, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp5);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp5)
{
SetPlayerCheckpoint(playerid,-2169.7625,-85.7253,34.7394, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp6);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp6)
{
SetPlayerCheckpoint(playerid,-2210.8586,-201.9729,34.8878, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp7);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp7)
{
SetPlayerCheckpoint(playerid,-2212.0488,-269.3461,34.8874, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp8);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp8)
{
SetPlayerCheckpoint(playerid,-2135.2651,-295.4728,34.9892, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp9);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp9)
{
SetPlayerCheckpoint(playerid,-2020.2981,-306.8248,35.0506, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp10);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp10)
{
SetPlayerCheckpoint(playerid,2017.7922,-351.4568,35.4342, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp11);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp11)
{
SetPlayerCheckpoint(playerid,-1894.4445,-311.0135,49.7420, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp12);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp12)
{
SetPlayerCheckpoint(playerid,1882.3644,-137.3632,37.8125, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp13);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp13)
{
SetPlayerCheckpoint(playerid,-1867.6086,149.9409,37.8061, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp14);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp14)
{
SetPlayerCheckpoint(playerid,-1811.1119,375.7741,16.5826, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp15);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp15)
{
SetPlayerCheckpoint(playerid,-1873.1676,407.7683,16.5849, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp16);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp16)
{
SetPlayerCheckpoint(playerid,-1924.8292,345.3977,30.8567, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp17);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp17)
{
SetPlayerCheckpoint(playerid,-2007.0159,330.2274,34.5790, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp18);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp18)
{
SetPlayerCheckpoint(playerid,-2009.0729,182.1045,27.1061, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp19);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp19)
{
SetPlayerCheckpoint(playerid,-2009.9824,18.8068,32.4147, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp20);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp20)
{
SetPlayerCheckpoint(playerid,-2021.0760,-67.0987,34.7389, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp21);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp21)
{
SetPlayerCheckpoint(playerid,-2050.6897,-81.1403,34.5095, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp22);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp22)
{
SetPlayerCheckpoint(playerid,-2032.5564,-99.9289,34.7310, 5.0);
SetPVarInt(playerid,"fscpid",fsautocp23);
}
else if(IsPlayerInCheckpoint(playerid) && GetPVarInt(playerid,"fscpid") == fsautocp23) // Hier auch um 1 Erhöhen
{
gLicenseC[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW2, "Sie haben die Praxis Bestanden Viel Spaß bein Zukünftigen fahren.");
praxis = 0;
}
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"Du hast keine Berechtigung in dieses Auto einzusteigen");
}
}
if(IsHeli(playerid,getthecar))
{
if(gLicenseF[playerid] == 0)
{
SendClientMessage(playerid,0xDB0000F6,"Du hast keinen Piloten-Schein! Wen dich die Cops so sehen gibt es Ärger!");
}
}
//
if(IsPlane(playerid,getthecar))
{
if(gLicenseF[playerid] == 0)
{
SendClientMessage(playerid,0xDB0000F6,"Du hast keinen Piloten-Schein! Wen dich die Cops so sehen gibt es Ärger!");
}
}
//
if(IsCar(playerid,getthecar))
{
if(gLicenseC[playerid] == 0)
{
SendClientMessage(playerid,0xDB0000F6,"Du hast keinen Führerschein! Wen dich die Cops so sehen gibt es Ärger!");
}
}
//
if(IsBoat(playerid,getthecar))
{
if(gLicenseB[playerid] == 0)
{
SendClientMessage(playerid,0xDB0000F6,"Du hast keinen Boots-Schein! Wen dich die Cops sehen gibt es Ärger!");
}
}
//
if(IsBike(playerid,getthecar))
{
if(gLicenseZ[playerid] == 0)
{
SendClientMessage(playerid,0xDB0000F6,"Du hast keinen Motorrad-Schein! Wen dich die Cops so sehen gibt es Ärger!");
}
}
}
return 1;
}
hoffe es kann jemand helfen