29.06.2011, 21:56
when i enter the race checkpoint it doesnt destroy it... im using Incogntios Streamer heres my code on
"OnPlayerEnterDynamicRaceCP"
Help Please ;P
"OnPlayerEnterDynamicRaceCP"
Код:
public OnPlayerEnterDynamicRaceCP(playerid, checkpointid) { if(checkpointid == wcp1[playerid]) { if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { GameTextForPlayer(playerid,"~y~Pickup Bonus! ~r~You Received ~g~$4000", 3000, 3); GivePlayerMoney(playerid, 4000); SendClientMessage(playerid,COLOR_YELLOW,"You Have Picked Up: Explosive Chickens"); SendClientMessage(playerid,COLOR_YELLOW,"Delivering To: WhiteWood Estate Burger Shot"); wcp2[playerid] = CreateDynamicRaceCP(2, 1137.6320,2085.8735,11.0625, 1137.6320,2085.8735,11.0625, 5.0, -1,-1, playerid,99999.0); DestroyDynamicRaceCP(wcp1[playerid]); return 1; } else { SendClientMessage(playerid,COLOR_YELLOW,"You Have Picked Up: Explosive Chickens"); SendClientMessage(playerid,COLOR_YELLOW,"Delivering To: WhiteWood Estate Burger Shot"); wcp2[playerid] = CreateDynamicRaceCP(2, 1137.6320,2085.8735,11.0625, 1137.6320,2085.8735,11.0625, 5.0, -1,-1, playerid,99999.0); DestroyDynamicRaceCP(wcp1[playerid]); return 1; } } if(checkpointid == wcp2[playerid]) { inwork[playerid] = 0; GivePlayerMoney(playerid, 3000); GameTextForPlayer(playerid, "~g~Delivery Complete!~n~~r~You Received ~g~$3000", 3000, 3); new pname[MAX_PLAYER_NAME]; new string[100 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "{F3FF02}%s {FFAF00}Has Delivered {00FFEE}Explosive Chickens {FFAF00}From{FFFFFF}: {6EF83C}Bone County Clucking Bell", pname); SendClientMessageToAll(0xAAAAAAAA, string); SendClientMessageToAll(0xAAAAAAAA, "{FFAF00}To{FFFFFF}:{6EF83C} White Wood Estate Burger Shot"); KillTimer(TruckCheckTimer[playerid]); DestroyDynamicRaceCP(wcp2[playerid]); return 1; } if(checkpointid == wcp3[playerid]) { if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { GameTextForPlayer(playerid,"~y~Pickup Bonus! ~r~You Received ~g~$4500", 3000, 3); GivePlayerMoney(playerid, 4500); SendClientMessage(playerid,COLOR_YELLOW,"You Have Picked Up: Scripting Tea"); SendClientMessage(playerid,COLOR_YELLOW,"Delivering To: Las Venturas Stadium"); wcp4[playerid] = CreateDynamicRaceCP(2, 1097.6992,1616.7985,12.5469, 1097.6992,1616.7985,12.5469, 5.0, -1,-1, playerid,99999.0); DestroyDynamicRaceCP(wcp3[playerid]); return 1; } else { SendClientMessage(playerid,COLOR_YELLOW,"You Have Picked Up: Scripting Tea"); SendClientMessage(playerid,COLOR_YELLOW,"Delivering To: Las Venturas Stadium"); wcp4[playerid] = CreateDynamicRaceCP(2, 1097.6992,1616.7985,12.5469, 1097.6992,1616.7985,12.5469, 5.0, -1,-1, playerid,99999.0); DestroyDynamicRaceCP(wcp3[playerid]); return 1; } } if(checkpointid == wcp4[playerid]) { inwork[playerid] = 0; GivePlayerMoney(playerid, 7500); GameTextForPlayer(playerid, "~g~Delivery Complete!~n~~r~You Received ~g~$7500", 3000, 3); new pname[MAX_PLAYER_NAME]; new string[100 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "{F3FF02}%s {FFAF00}Has Delivered {00FFEE}Scripting Tea {FFAF00}From{FFFFFF}: {6EF83C}Bone County Ammunation", pname); SendClientMessageToAll(0xAAAAAAAA, string); SendClientMessageToAll(0xAAAAAAAA, "{FFAF00}To{FFFFFF}:{6EF83C} Las Venturas Stadium"); KillTimer(TruckCheckTimer[playerid]); DestroyDynamicRaceCP(wcp4[playerid]); return 1; } return 1; }