22.11.2014, 19:58
I've got:
But how we know, vehicle could have two colors. Is there anyway to keep two colors in one table?
Код:
new playersvehcolorid[MAX_PLAYERS];
new playersvehcolorid[MAX_PLAYERS];
new playersvehcolorid[MAX_PLAYERS][2];
playersvehcolorid[playerid][0] = 2;// Color one
playersvehcolorid[playerid][1] = 6;// Color two
playersvehmodelid[playerid] = modelid;
modelid = playersvehmodelid[playerid];
#include <a_samp>
new playersvehmodelid[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new modelid=GetVehicleModel(vehicleid);
playersvehmodelid[playerid]=modelid;//This is SETting playersvehmodelid[playerid] to modelid.
//playersvehmodelid[playerid] is changed to modelid.
//blablabla
return 1;
}
CMD:getvmod(playerid, params[])
{
new modelid = playersvehmodelid[playerid]; //This is GETting information FROM playersvehmodelid[playerid] to modelid
//playersvehmodelid[playerid] is not changed.
//blablabla
return 1;
}