Vin cu o problema si va rog daca se poate sa-mi oferiti un mic ajutor. Am gasit acest sistem de lift ,lasat in scriptul de mai jos. Intrebarea mea este: in acest script se pot folosi doua lifturi aflate in locatii diferite? Daca da, cum? va multumesc mult. (scuze acele paranteze, le-am facut eu ca mici hint-uri in caz ca voi vrea sa schimb locatia lui)
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define BackTime 12000 // Timpul in care liftul revine la pozitia initiala
new pdlift;
forward PdLift();
forward IsACop(playerid);
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public OnFilterScriptInit()
{
//////////////////////////////////////////////////////////////////////////
//////////aici se pune exteriorul ////////
//////////////////////////////////////////////////////////////////////////
pdlift =CreateObject(19359, 2089.24634, 2361.20728, 10.20070, 0.00000, -90.00000, 0.00000); ///// liftul
print("\n--------------------------------------");
print(" Flashhiee");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lift", cmdtext, true, 10) == 0) {
if(PlayerToPoint(5.0,playerid,2089.24634, 2361.20728, 10.20070) || PlayerToPoint(5.0,playerid,2089.24634, 2361.20728, 22.48570)) { /// sus /jos
if(!IsObjectMoving(pdlift)) {
MoveObject(pdlift,2089.24634, 2361.20728, 22.48570,1.5); //// jos
SetTimer("PdLift",BackTime,false); } else {
SendClientMessage(playerid,-1,"Lift is already used."); }
} else {
SendClientMessage(playerid,-1,"You must be close to lift."); }
return 1;
}
return 0;
}
public PdLift()
{
MoveObject(pdlift,2089.24634, 2361.20728, 10.20070,1.5); //// sus
return 1;
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
#endif
#define BackTime 12000 // Timpul in care liftul revine la pozitia initiala