23.02.2013, 10:15
(
Последний раз редактировалось AaronFarley; 23.02.2013 в 11:29.
Причина: Another problem
)
Scratch the solved part.
Ok so now i got the main part working, now i need the checkpoint to show the next checkpoint but i get raped by errors. After loading the rubbish or whatever the checkpoint should show the offload point and at the offloadpoint the mission should end and you get money and +1 score. But for some reason my code is fucked up XP
If you could helo it would be appriciated.
Ok so now i got the main part working, now i need the checkpoint to show the next checkpoint but i get raped by errors. After loading the rubbish or whatever the checkpoint should show the offload point and at the offloadpoint the mission should end and you get money and +1 score. But for some reason my code is fucked up XP
If you could helo it would be appriciated.
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n******************************"); print(" *** Life Of Transporting *** \n"); print("\n******************************"); print (" *** Version 0.1 Alpha *** \n); print("\n******************************") print (" ***By Deathguise Aaronfarley)*"); print("\n******************************"); return 1; } public OnFilterScriptExit() { return 1; } #else new MissionStage[MAX_PLAYERS]; //stages //0 - no mission //1 - Gonna pick up the load //2 - Taking Load to drop off //3 - Mission Completed! //COLORS #define COLOR_ORANGE 0xFFA500FF #define COLOR_LIMEGREEN 0x32CD32FF #define COLOR_ROYALBLUE 0x4169E1FF #define COLOR_PINK 0xFA8072FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA //Rubbish Truck new Float: checkpoints[5][4] = { { 2798.1702,-1576.2926,10.9272, 10.0 }, { 2060.4375,-2091.2126,13.5469, 10.0 }, { 070.8125,-2384.6160,13.5469, 10.0 }, { 900.7358,-1204.0779,16.9832, 10.0 }, { 800.1103,-1542.8258,13.5526, 10.0 } }; main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Life Of Transport"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //Server Vehicles CreateVehicle(455, 0, 0, 12.2887, 82.2873, -1, -1, 60); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/work", cmdtext, true, 10) == 0) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455) { if (MissionStage[4] >0) { SendClientMessage(playerid,COLOR_RED,"You are already doing the rubbish truck driving Mission!"); return 1; } MissionStage[4] = 1; new rand = random(sizeof(checkpoints)); SetPlayerCheckpoint(playerid,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2],checkpoints[rand][3]); GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3); new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s is now doing the Rubbish Truck mission.", name ); SendClientMessageToAll(COLOR_YELLOW, string); return 1; } SendClientMessage(playerid, COLOR_RED,"You have to be in a truck to start the job"); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455) SendClientMessage(playerid,COLOR_RED,"Loading Rubbish"); return 1; MissionStage[4] =1) SetPlayerCheckpoint(playerid,0,0,10,0); GameTextForPlayer(playerid, "~g~Go drop off the rubbish!", 3000, 3); else if (MissionStage[4] =2); SendClientMessage(playerid,COLOR_RED,"Unloading Rubbish"); GameTextForPlayer(playerid, "~g~Yo Completed The Mission", 3000, 3); SetPlayerScore(playerid, +1); giveplayermoney(playerid, 5000));*/ return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; }