SA-MP Forums Archive
Messages and actions for entering OWNED locked cars - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Messages and actions for entering OWNED locked cars (/showthread.php?tid=92728)



Messages and actions for entering OWNED locked cars - coole210 - 21.08.2009

pawn Код:
for(new i = 0; i < sizeof(Cars); i++)
    {
        new newcar = vehicleid;
        new string[256];
    if(newcar == Cars[i][ownedvehicle])
        {
          new guy = GetPlayerID(Cars[i][cOwner]);
          if(Cars[i][cOwned] == 1 && Cars[i][cLocked] == 1 && Logged[guy] == 1 && ispassenger == 0)
          {
            format(string,sizeof(string),"[ ! ] ID: %d ' %s ' Bought by: %s",newcar,Cars[i][cDescription],Cars[i][cOwner]);
            SendClientMessage(playerid,COLOR_GREY,string);
            SendClientMessage(playerid,COLOR_GREY,"[ ! ] This vehicle is locked by the buyer !");
            SendClientMessage(playerid,COLOR_GREY,"[ ! ] This vehicle is locked by the buyer !");
            GetPlayerPos(playerid,Float:LocX,Float:LocY,Float:LocZ);
            SetPlayerPos(playerid,Float:LocX,Float:LocY,Float:LocZ);
            return 1;
            }
            if(Cars[i][cOwned] == 1 && Cars[i][cLocked] == 1 && Logged[guy] == 0 && ispassenger == 0)
          {
            format(string,sizeof(string),"[ ! ] ID: %d ' %s ' Bought by: %s",newcar,Cars[i][cDescription],Cars[i][cOwner]);
            SendClientMessage(playerid,COLOR_GREY,string);
            SendClientMessage(playerid,COLOR_GREY,"[ ! ] This vehicle is locked by the buyer but he/she is not online.");
            return 1;
            }
            if(Cars[i][cOwned] == 0 && ispassenger == 0)
            {
            format(string,sizeof(string),"[ ! ] ID: %d ' %s ' Price: %d RCASH",newcar,Cars[i][cDescription],Cars[i][cPrice]);
            SendClientMessage(playerid,COLOR_GREY,string);
            return 1;
            }
            if(Cars[i][cOwned] == 1 && ispassenger == 0)
            {
            format(string,sizeof(string),"[ ! ] ID: %d ' %s ' Bought by: %s",newcar,Cars[i][cDescription],Cars[i][cOwner]);
            SendClientMessage(playerid,COLOR_GREY,string);
            return 1;
            }
            if(Cars[i][cOwner] == 1 && ispassenger == 0)
            {
            format(string,sizeof(string),"[ ! ] ID: %d ' %s ' Bought by: %s",newcar,Cars[i][cDescription],Cars[i][cOwner]);
            SendClientMessage(playerid,COLOR_GREY,string);
            return 1;
            }
        }
    }
Okay if someone else enters my car its no message, if i enter my car it says its locked by the buyer (me). whats the problem?