27.01.2011, 23:42
How to respawn Trailer that is something that is hooked up to the first vehicle ..
So for example: I do mechanic work and now when it comes to the last CP do not know how to set hooked up to vehicle respawn
Command:
And:
So for example: I do mechanic work and now when it comes to the last CP do not know how to set hooked up to vehicle respawn
Command:
Код:
if(strcmp(cmd,"/odvuci",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pJob] == 7) { if(IsPlayerInAnyVehicle(playerid)) { if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525) { if(GetPlayerState(playerid)==2) { new Float:pX,Float:pY,Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); new Float:vX,Float:vY,Float:vZ; new Found=0; new vid=0; while((vid<MAX_VEHICLES)&&(!Found)) { vid++; GetVehiclePos(vid,vX,vY,vZ); if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid))) { Found=1; if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { DetachTrailerFromVehicle(GetPlayerVehicleID(playerid)); } else { AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid)); SendClientMessage(playerid, COLOR_DBLUE, "Odvezi auto do CheckPointa"); CP[giveplayerid] = 14000; SetPlayerCheckpoint(giveplayerid, 1041.0383,-1095.2030,23.8281,8.0); } } } if(!Found) { SendClientMessage(playerid,SVETLOPLAVA,"Nisi dovoljno blizu auta"); } } else { SendClientMessage(playerid, SVETLOPLAVA, "Niste u vozilu"); return 1; } } else { SendClientMessage(playerid, SVETLOPLAVA, "Niste u autu od Mehanicara"); return 1; } } else { SendClientMessage(playerid, SVETLOPLAVA, "Niste u vozilu"); return 1; } } else { SendClientMessage(playerid,SVETLOPLAVA,"Niste Mehanicar"); return 1; } } return 1; }
Код:
else if(CP[playerid] == 14001) { CP[playerid] = 0; DisablePlayerCheckpoint(playerid); JB_GivePlayerMoney(playerid, 50); SendClientMessage(playerid,SVETLOPLAVA,"==========================="); SendClientMessage(playerid,SVETLOPLAVA,"Odlozio si auto i dobio 50$"); SendClientMessage(playerid,SVETLOPLAVA,"==========================="); GetPlayerName(playerid, name, sizeof(name)); }