21.07.2012, 23:11
Hello there!
I am having some difficulties here.
I am having a /loadtruck command to load the truck.
Anyone know's what wrong?
Any help appreciated.
I am having some difficulties here.
I am having a /loadtruck command to load the truck.
pawn Код:
CMD:loadtruck(playerid, params[]) {
if(pInfo[playerid][pJob] == 1){
if(IsVehicleTruck(GetPlayerVehicleID(playerid))){ // Checks if you are inside a truck.
if(IsPlayerInRangeOfPoint(playerid, 5, 2197.8425,-2662.9883,13.5469)) { // Checks if you are close enough to the loading point.
if(pInfo[playerid][pCheckpoint] == 0){
CountDownCheck10(playerid); // calls the script to start the timer to load the truck
} else return SendClientMessage(playerid, COLOR_WHITE, "You are not a trucker.");
} else return SendClientMessage(playerid, COLOR_WHITE, "You are not in an Ocean Dock truck.");
} else return SendClientMessage(playerid, COLOR_WHITE, "To load the truck, go to the loading garage in Ocean Docks, then /loadtruck.");
} else return SendClientMessage(playerid, COLOR_WHITE, "You already have an existing checkpoint or trucking route.");
return 1;
}
pawn Код:
enum PlayerInfo
{
/* Temp Values */
pTruckLoaded = 0,
pCheckpoint = 0,
/* ----------- */
pPass[129], //User's password
pAdmin, //User's admin level
pDonator, //User's vip level
pMoney, //User's money
pBank, // User's bank money
pLevel, //User's scores
pKills, //User's kills
pDeaths, //User's deaths
pSkin, // User's skin.
Float:pHealth, // User's health.
Float:pArmor, // User's armor.
Float:pPosX, // User's posX.
Float:pPosY, // User's posY.
Float:pPosZ, // User's posZ.
pFaction,
pFacRank,
pJob,
pJobSkill1,
pJobSkill2,
pBanned,
pBanReason,
pIP[20]
}
Any help appreciated.