Help respawn
#1

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:

Код:
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;
	}
And:

Код:
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));
 	}
Reply
#2

Help !?
Reply
#3

Quote:
Originally Posted by >>|Hawks|<<
Посмотреть сообщение
Help !?
Heelllpppp
Reply
#4

Can SomeBody help me ?!
Reply
#5

LoL, Help
Reply
#6

Serbian:Ovde ti niko ne koristi GF tako da ne verujem da ce ti neko pomoci :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)