19.05.2015, 20:50
Hi, how can I use this file http://pastebin.com/9EKAF2ZF for example:
Player chooses CASE A and he'll do test trip, then when he has finished this one
For example he selects CASE A, this one corresponds to License A and when he finishes driving trip he'll get pLicenzaA in place of PlayerInfo[playerid][pdrivelicense][PlayerInfo[playerid][pondrivetest]]=20;
SavePlayer(playerid);
PlayerInfo[playerid][pdrivelicense][PlayerInfo[playerid][pondrivetest]]=20;
SavePlayer(playerid); -> PlayerInfo[playerid][pdrivelicense][PlayerInfo[playerid][pLicenzaA]]=20;
SavePlayer(playerid);
Player chooses CASE A and he'll do test trip, then when he has finished this one
Код:
if(GetPlayerVehicleID(playerid)==PlayerInfo[playerid][pdrivetestcar] && PlayerInfo[playerid][pondrivetest]!=-1) { DisablePlayerRaceCheckpoint(playerid); PlayerInfo[playerid][pdrivetestchk]++; if(PlayerInfo[playerid][pdrivetestchk]==11)//penultimo { SetPlayerRaceCheckpoint(playerid,1,drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][0][0],drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][0][1],drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][0][2],0.0,0.0,0.0,3); } else if(PlayerInfo[playerid][pdrivetestchk]==12)//ultimo { new Float:vh; GetVehicleHealth(PlayerInfo[playerid][pdrivetestcar],vh); if(vh<950) SendClientMessage(playerid,COLOR_NO,"Il veicolo и danneggiato! Sei stato bocciato"); else { SendClientMessage(playerid,COLOR_INFO,"Complimenti! Hai superato il test, ora hai la tua patente con 20 punti"); PlayerInfo[playerid][pdrivelicense][PlayerInfo[playerid][pondrivetest]]=20; SavePlayer(playerid); } PlayerInfo[playerid][pondrivetest]=-1; VehicleInfo[PlayerInfo[playerid][pdrivetestcar]][visvalid]=0; UnLockVehicle(PlayerInfo[playerid][pdrivetestcar]); DestroyVehicle(PlayerInfo[playerid][pdrivetestcar]); SetPlayerPos(playerid,-90.9501,1118.4391,20.7860); } else { new chktype; switch(PlayerInfo[playerid][pondrivetest]) { case DRIVE_LICENSE_A, DRIVE_LICENSE_B, DRIVE_LICENSE_C, DRIVE_LICENSE_D, DRIVE_LICENSE_BOAT: chktype=0; case DRIVE_LICENSE_FLY_HELI, DRIVE_LICENSE_FLY_PLANE: chktype=3; default: chktype=0; } SetPlayerRaceCheckpoint(playerid,chktype,drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][PlayerInfo[playerid][pdrivetestchk]][0],drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][PlayerInfo[playerid][pdrivetestchk]][1],drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][PlayerInfo[playerid][pdrivetestchk]][2], drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][PlayerInfo[playerid][pdrivetestchk]+1][0],drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][PlayerInfo[playerid][pdrivetestchk]+1][1],drivetestcheckpoint[PlayerInfo[playerid][pondrivetest]][PlayerInfo[playerid][pdrivetestchk]+1][2],3); } }
SavePlayer(playerid);
PlayerInfo[playerid][pdrivelicense][PlayerInfo[playerid][pondrivetest]]=20;
SavePlayer(playerid); -> PlayerInfo[playerid][pdrivelicense][PlayerInfo[playerid][pLicenzaA]]=20;
SavePlayer(playerid);