new CDLLOADAT1 = 0; new CDLLOADFT1 = 0; new CDLLOADCT1 = 0;
if(CDLLOADAT1 == 1) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 403 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 514 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 515) { SendClientMessage(playerid, COLOR_RED, "WARNING: {FFFFFF}You cannot complete the drop without the load."); DisablePlayerCheckpoint(playerid); CDLLOADAT1 = 0; return 1; } DisablePlayerCheckpoint(playerid); CDLLOADAT1 = 2; SendClientMessage(playerid, COLOR_DBLUE, "Dock Staff: {FFFFFF}Please deliver these parts to the abandoned airport!"); SetPlayerCheckpoint(playerid, 382.6809,2539.5164,16.5391, 3.0); return 1; } if(CDLLOADAT1 == 2) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 403 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 514 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 515) { SendClientMessage(playerid, COLOR_RED, "WARNING: {FFFFFF}You cannot complete the drop without the load."); DisablePlayerCheckpoint(playerid); CDLLOADAT1 = 0; return 1; } if(IsCDLVehicles(GetPlayerVehicleID(playerid))) { DisablePlayerCheckpoint(playerid); CDLLOADAT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "AA Scrapyard: Thank you for delivering these parts, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "AA Scrapyard handed you a payslip of $5,000."); SendClientMessage(playerid, COLOR_GRAD2, "A certain amount has been deducted for the use of a company truck."); GivePlayerCash(playerid, 5000); PlayerInfo[playerid][pTruckSkill]++; return 1; } DisablePlayerCheckpoint(playerid); CDLLOADAT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "AA Scrapyard: Thank you for delivering these parts, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "AA Scrapyard handed you a payslip of $10,000."); GivePlayerCash(playerid, 10000); PlayerInfo[playerid][pTruckSkill]++; return 1; } if(CDLLOADFT1 == 1) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 403 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 514 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 515) { SendClientMessage(playerid, COLOR_RED, "WARNING: {FFFFFF}You cannot complete the drop without the load."); DisablePlayerCheckpoint(playerid); CDLLOADFT1 = 0; return 1; } DisablePlayerCheckpoint(playerid); CDLLOADFT1 = 2; SendClientMessage(playerid, COLOR_DBLUE, "Dock Staff: {FFFFFF}Please deliver these parts to KACC Fuels!"); SetPlayerCheckpoint(playerid, 2576.0520,2728.2244,10.8203, 3.0); return 1; } if(CDLLOADFT1 == 2) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 403 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 514 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 515) { SendClientMessage(playerid, COLOR_RED, "WARNING: {FFFFFF}You cannot complete the drop without the load."); DisablePlayerCheckpoint(playerid); CDLLOADFT1 = 0; return 1; } if(IsCDLVehicles(GetPlayerVehicleID(playerid))) { DisablePlayerCheckpoint(playerid); CDLLOADFT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "KACC Fuels: Thank you for delivering the fuel, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "KACC Fuels: handed you a payslip of $10,000 danger money."); SendClientMessage(playerid, COLOR_GRAD2, "A certain amount has been deducted for the use of a company truck."); GivePlayerCash(playerid, 10000); PlayerInfo[playerid][pTruckSkill]++; return 1; } DisablePlayerCheckpoint(playerid); CDLLOADFT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "KACC Fuels: Thank you for delivering the fuel, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "KACC Fuels: handed you a payslip of $10,000 + $5,000 danger money."); GivePlayerCash(playerid, 15000); PlayerInfo[playerid][pTruckSkill]++; return 1; } if(CDLLOADCT1 == 1) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 403 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 514 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 515) { SendClientMessage(playerid, COLOR_RED, "WARNING: {FFFFFF}You cannot complete the drop without the load."); DisablePlayerCheckpoint(playerid); CDLLOADCT1 = 0; return 1; } DisablePlayerCheckpoint(playerid); CDLLOADCT1 = 2; SendClientMessage(playerid, COLOR_DBLUE, "Dock Staff: {FFFFFF}Please deliver these parts to LV Quarry!"); SetPlayerCheckpoint(playerid, 789.0222,838.3677,5.9615, 3.0); return 1; } if(CDLLOADCT1 == 2) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER && IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 403 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 514 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 515) { SendClientMessage(playerid, COLOR_RED, "WARNING: {FFFFFF}You cannot complete the drop without the load."); DisablePlayerCheckpoint(playerid); CDLLOADCT1 = 0; return 1; } if(IsCDLVehicles(GetPlayerVehicleID(playerid))) { DisablePlayerCheckpoint(playerid); CDLLOADCT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "LV Quarry: Thank you for delivering the coal, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "LV Quarry: handed you a payslip of $2,500."); SendClientMessage(playerid, COLOR_GRAD2, "A certain amount has been deducted for the use of a company truck."); GivePlayerCash(playerid, 2500); PlayerInfo[playerid][pTruckSkill]++; return 1; } DisablePlayerCheckpoint(playerid); CDLLOADCT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "LV Quarry: Thank you for delivering the coal, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "LV Quarry: handed you a payslip of $5,000."); GivePlayerCash(playerid, 5000); PlayerInfo[playerid][pTruckSkill]++; return 1; }
DisablePlayerCheckpoint(playerid); CDLLOADFT1 = 0; SendClientMessage(playerid, COLOR_GRAD1, "KACC Fuels: Thank you for delivering the fuel, here's your money!"); SendClientMessage(playerid, COLOR_GRAD2, "KACC Fuels: handed you a payslip of $10,000 + $5,000 danger money."); GivePlayerCash(playerid, 15000); PlayerInfo[playerid][pTruckSkill]++; return 1; |
You have done this work
It will be executed when player reaches the CP no checking of trailer. I have quoted just one part And one more thing why you used !=, do you know it means "is not equal to". Thanks In Advance |
new CDLLOADAT1[MAX_PLAYERS] = 0; |
if(CDLLOADAT1[playerid] == 1) |
Just use this under in "news"
And in "if" use like this: Do you need explanation of this or not? Thanks In Advance +rep if you like my work |
C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58251) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58255) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58266) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58272) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58281) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58294) : error 033: array must be indexed (variable "CDLLOADFT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58298) : error 033: array must be indexed (variable "CDLLOADFT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58309) : error 033: array must be indexed (variable "CDLLOADFT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58315) : error 033: array must be indexed (variable "CDLLOADFT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58324) : error 033: array must be indexed (variable "CDLLOADFT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58337) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58341) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58352) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58358) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(58367) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(61206) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(61215) : error 033: array must be indexed (variable "CDLLOADAT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(61229) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(61238) : error 033: array must be indexed (variable "CDLLOADCT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(61252) : error 033: array must be indexed (variable "CDLLOADFT1") C:\Users\Twat\Desktop\Real World Roleplay\gamemodes\RWRP.pwn(61261) : error 033: array must be indexed (variable "CDLLOADFT1")
then index these variables with [playerid], or this will create a big problem??
I prefer using replace option if you think it will cause no harm |