27.08.2011, 10:56
Hi, I made a little job for a driver who has to bring peolpe from one place to another, to do so I used pickups...
In this script there are 3 pickups made for this job creation.
Startworkpickup: When the player enters this pickup his job will start (works)
traviswork1: When the player enters this one, he has picked up his client to bring him to another place (does not work)
traviswork2: When the player enters this one, the job is done
So yeah the second pickup doesn't work...
When I enter it, it keeps respawning... so I keep getting the message that I have to bring him to a place...
Please help me...
also there is a little textdraw creation wich should spawn when enterring pickup startwork, but it only shows when the player enters pickup traviswork1...
In this script there are 3 pickups made for this job creation.
Startworkpickup: When the player enters this pickup his job will start (works)
traviswork1: When the player enters this one, he has picked up his client to bring him to another place (does not work)
traviswork2: When the player enters this one, the job is done
So yeah the second pickup doesn't work...
When I enter it, it keeps respawning... so I keep getting the message that I have to bring him to a place...
Please help me...
also there is a little textdraw creation wich should spawn when enterring pickup startwork, but it only shows when the player enters pickup traviswork1...
Code:
new vehicle; vehicle = GetVehicleModel(GetPlayerVehicleID(playerid)); if(pickupid == startworkpickup) { if(vehicle == 516) { DestroyPickup(startworkpickup); SetPlayerMapIcon( playerid, 2, 334.4390,-1519.8026,35.7015, 55, 0, MAPICON_GLOBAL ); GameTextForPlayer(playerid,"~w~ Job Lvl 1~g~ :Travis Pastrana is going to participate the X-games",4000,3); SendClientMessage(playerid, COLOR_YELLOW, "|-Check the map to see the point where to go. -|"); IsWorking[playerid] = 1; FinishedTask1[playerid] = 1;//he entered the pickup traviswork1 = CreatePickup(1254, 14, 334.4390,-1519.8026,35.7015, -1); //De Textdraw TextDrawShowForPlayer(playerid,Opdracht); Opdracht = TextDrawCreate(4.000000,435.000000,"~w~Bring ~y~ Travis Pastrana ~w~ From ~b~His hotel~w~ To ~g~The stadion!"); TextDrawFont(Opdracht,1); TextDrawColor(Opdracht,0xFFFFFFAA); TextDrawLetterSize(Opdracht,0.4,1); TextDrawSetOutline(Opdracht,1); TextDrawSetShadow(Opdracht,0); TextDrawSetProportional(Opdracht,1); TextDrawBackgroundColor(Opdracht,0x000000ff); TextDrawUseBox(Opdracht, 1); TextDrawBoxColor(Opdracht, 0x2C2727AA); return 1; } } else if(pickupid == traviswork1) { if(vehicle == 516) { if(IsWorking[playerid] == 1) { if(FinishedTask1[playerid] == 1) { DestroyPickup(traviswork1); GameTextForPlayer(playerid,"~w~ You picked him up.~g~bring him to the stadium",4000,3); SendClientMessage(playerid, COLOR_YELLOW, "|-Check the map to see the point where to go. -|"); RemovePlayerMapIcon( playerid, 2 ); SetPlayerMapIcon( playerid, 2, 2732.6616,-1841.6346,9.9145, 55, 0, MAPICON_GLOBAL ); FinishedTask2[playerid] = 1;//he entered the pickup FinishedTask1[playerid] = 0; traviswork2 = CreatePickup(1254, 14, 2732.6616,-1841.6346,9.9145, -1); return 1; } } } else { GameTextForPlayer(playerid,"~r~ ERROR: ~w~You are not in the right vehicle for this mission!",4000,3); } } else if(pickupid == traviswork2) { if(vehicle == 516) { if(IsWorking[playerid] == 1) { if(FinishedTask2[playerid] == 1) { DestroyPickup(traviswork2); new string[128]; GameTextForPlayer(playerid,"~w~ Mission accomplished!",4000,3); SendClientMessage(playerid, COLOR_GREEN, "-U have been given $1500 for completing a level 1 mission.-"); RemovePlayerMapIcon( playerid, 2 ); TextDrawHideForPlayer(playerid, Opdracht); GivePlayerMoney(playerid,1500); startworkpickup = CreatePickup(1254, 14, 669.7355,-1275.9504,13.4609, -1); FinishedTask2[playerid] = 0; FinishedTask1[playerid] = 0; new mrand =random(500); format(string,sizeof(string),"-Travis has given u $%d as a little bonus!-",mrand); SendClientMessage(playerid,COLOR_GREEN,string); GivePlayerMoney(playerid,mrand); SendClientMessage(playerid, COLOR_SEXYGREEN, "-Mission accomplished, wanna go back to your base and do another mission? type /home.-"); } } } else { GameTextForPlayer(playerid,"~r~ ERROR: ~w~You are not in the right vehicle for this mission!",4000,3); } } //other code