Jump to content
  • 0

Problema script masina personala


infinity1

Question

Salut, am o problema la un script de masina personala am facut totul cum trebuie dar in joc nu merge, am adaugat tot

new rhaskoscar3;
rhaskoscar3 = CreateVehicle(402,2094.7776,1547.1605,10.7754,103.0467,222,0, 1800);
    if(newstate == PLAYER_STATE_DRIVER)
	{
	    if(vehicleid == rhaskoscar3)
	    {
	        if(strcmp(pname, "Rhaskos", true) == 0)
	        {
	            	return 1;
	            }
	            else
	            {
					RemovePlayerFromVehicle(playerid);
					SendClientMessage(playerid,red, "Aceasta masina este al lui Rhaskos.");
					SendClientMessage(playerid,red, "Daca vrei si tu una doneaza 3 euro.");
				}
			}
		}

N-am habar de ce nu merge, ii dau compile nicio eroare niciun warning, intru in joc, masina apare pozitionata unde am vrut dar pot sa o conduc cu orice nume adica nu funcioneaza RemovePlayerFromVehicle daca numele e altul inafara de Rhaskos si nu inteleg de ce...

BannerZdupp.png

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

    if ( newstate == PLAYER_STATE_DRIVER )

   

    {

        if ( vehicleid == rhaskoscar3 )

   

        {

   

            new

 

                name [ MAX_PLAYER_NAME ]

            ;

   

            GetPlayerName ( playerid , name , sizeof ( name ) ) ;

   

            if ( strcmp ( name , "Rhaskos" , true ) == 0 )

       

            {

                return ( 1 ) ;

            }

            else

            {

                #define SCM  SendClientMessage

                RemovePlayerFromVehicle ( playerid ) ;

                SCM ( playerid , -1 , "Aceasta masina este al lui Rhaskos." ) ;

                SCM ( playerid , -1 , "Daca vrei si tu una doneaza 3 euro." ) ;

            }

        }

    }

Link to comment
Share on other sites

[pawn]    if(newstate == PLAYER_STATE_DRIVER)

{

    if(vehicleid == rhaskoscar3)

    {

        if(strcmp(pname, "Rhaskos", true) == 0)

        {

RemovePlayerFromVehicle(playerid);

SendClientMessage(playerid,red, "Aceasta masina este al lui Rhaskos.");

SendClientMessage(playerid,red, "Daca vrei si tu una doneaza 3 euro.");

            return 1;

            }

}

          }[/pawn]

idiots.png
Link to comment
Share on other sites

La OnPlayerStateChange pui

[pawn]if(newstate == PLAYER_STATE_DRIVER)

{

    new vehid = GetPlayerVehicleID(playerid);

    if(vehid == rhaskoscar3)

    {

        if(!(strcmp(pname, "Rhaskos", true) == 0))

        {

RemovePlayerFromVehicle(playerid);

SendClientMessage(playerid,red, "Aceasta masina este al lui Rhaskos.");

SendClientMessage(playerid,red, "Daca vrei si tu una doneaza 3 euro.");

            return 1;

    }

}

  [/pawn]

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

gireada ai uitat o } la sfarsit si se intampla la fel, nicio eroare, niciun warning masina apare in joc dar indiferent de nume pot sa o conduc, adica nu ma scoate din ea, incep sa cred ca nu e de la script si poate imi lipseste ceva pe la streamer, inc. ... n-am idee

BannerZdupp.png

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.