21.08.2009, 20:53
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;
}
}
}