Jump to content
  • 0

Un ajutor micut daca se poate Multumesc


Gabriel19

Question

Salut as dori si eu un mic ajutor cu 2 comenzi nu reusesc sa fac daca mati putea ajuta ar fi foarte frumos Multumesc !

#include <a_samp>
//cars
new sinbadcar;
//icons
new sinbad;
//colors
#define red 		 0xFF0000AA
#define green 		 0x33FF33AA
#define yellow 		 0xFFFF00AA


public OnFilterScriptInit()
{
    print("************************************");
    print("*                                  *");
    print("*     -----------------------      *");
    print("*     | Private Cars  V 1.0 |      *");
    print("*     -----------------------      *");
    print("*      *");
    print("*                                  *");
    print("************************************");

//add cars here
	sinbadcar = AddStaticVehicle(418,1144.1190,-1445.1765,15.9024,180.0627,108,108); //  [ECA]Sinbad's Car
    return 1;
}

public OnPlayerStateChange(playerid,newstate, oldstate)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	new pname[MAX_PLAYER_NAME];

	GetPlayerName(playerid,pname,sizeof pname);

	if (newstate == PLAYER_STATE_DRIVER)
	{
		if (vehicleid == sinbadcar)
		{
		 if(strcmp(pname,"[ECA]Sinbad",true) ==0)
		 {
			{
			SendClientMessage(playerid,green,"Welcome back to your private vehicle Admin Sinbad");
			}

		    return 1;
		 }
		 else
		 {
			RemovePlayerFromVehicle(playerid);
			SendClientMessage(playerid,red,"This PRIVATE Vehicle belongs to [ECA]Sinbad, you cannot drive this vehicle");
		 }
		}
	}
	return 1;

Deci daca puteti sa ma ajutati cu comanda /park si /locatecar nu reusesc deloc Multumesc frumos

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Am gasit eu o comanda

}
	else if (strcmp("/park", cmd, true, 10) == 0)
	{
		if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
		{
		    GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]);
		    GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]);
		    SendClientMessage(playerid, COLOR_GREEN, "Saved car position!");
		}
		else { SendClientMessage(playerid, COLOR_GREY, "That is not your car!"); }
		return 1;
	}

dar cum o adaug :| Va rog frumos ajutatima

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.