30.08.2010, 00:52
aew galera tipo eu vi em um servidor que tinha /guichar pros mecanicos ja procurei no search nao achei
Ajuda ae vlw
Ajuda ae vlw
if(PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)//Altere Aqui
GettingEmprego[playerid] = 7;
if(strcmp(cmd,"/guinchar",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)//Altere Aqui
{
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)))
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
}
else
{
AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
}
}
}
if(!Found)
{
SendClientMessage(playerid,0xFFFF00AA,"Nгo tem nenhum carro perto.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк precisa estбr dirigindo!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem um Guincho!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб em um carro!!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD2,"Vocк nгo й mecanico!");
return 1;
}
}
return 1;
}