Anyone can help me Please ?!
#4

Sorry, I didn't noticed it before. However I don't know if that was the problem, the code compiles fine to me.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar; // <
    newcar = GetPlayerVehicleID(playerid); // <
    if(newcar == dr1)  // pui numele care l-ai pus la new si la masina respectiva,in caz ca adaugi alta
    {
        new PlayerName[MAX_PLAYER_NAME];
        new playerState = GetPlayerState(playerid);
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(strcmp(PlayerName, "dR.", true) == 0) // aici schimbi in numele jucatorului caruia vrei sa-i dai masina
        {
            SendClientMessage(playerid, 0xFF0000FF,"* E masina ta dR ! Bucura-te de Scriptul lui EugenEBv.");  //mesajul care apare cand intrii in masina
        }
        else if (playerState == PLAYER_STATE_PASSENGER)
        {
            SendClientMessage(playerid, 0xFF0000FF,"* Ai intrat in masina lui dR..");  // mesajul care apare pasagerilor
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            new Float:cx, Float:cy, Float:cz;
            GetPlayerPos(playerid, cx, cy, cz);
            SetPlayerPos(playerid, cx,  cy, cz);
            SendClientMessage(playerid, COLOR_RED,"* Aceasta masina ii apartine lui dR."); // mesajul care apare daca incearca cineva sa intre ca sofer ,dar nu este masina lui
        } // 1
    } // 2
    return 1;
}
Reply


Messages In This Thread
Anyone can help me Please ?! - by Eug3N - 11.11.2011, 17:18
Re: Anyone can help me Please ?! - by Cypress - 11.11.2011, 17:20
Re: Anyone can help me Please ?! - by Eug3N - 11.11.2011, 17:22
Re: Anyone can help me Please ?! - by Cypress - 11.11.2011, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)