example of it in my server..
Code:
new ServerColors[21] = { // SERVER MESSAGE COLORS.
0xADFF2FFF, 0x90EE90FF, 0xFF4500FF, 0x4169FFFF, 0x9ACD32FF,
0xFFFF00FF, 0xDA70D6FF, 0x87CEFAFF, 0xFAFAD2FF, 0xFAEBD7FF,
0x6495EDFF, 0x4EEE94FF, 0xC0FF3EFF, 0xFFFF00FF, 0xFFB90FFF,
0x7171C6FF, 0x9B30FFFF, 0xA2B5CDFF, 0xC0FF3EFF, 0xFFD700FF
};
Code:
if(strcmp(cmdtext, "/LV", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
new rand = random(2);
if (rand == 0)
{
SetVehiclePos(VehicleID, 2055.5376,1917.5587,12.1683);
SetVehicleZAngle(VehicleID, 178.1285);
}
else if (rand == 1)
{
SetVehiclePos(VehicleID, 2039.5123,1916.5410,12.1667);
SetVehicleZAngle(VehicleID, 182.2019);
}
}
else
{
SetPlayerPos(playerid, 2004.4939,1914.2422,40.3516);
SetPlayerFacingAngle(playerid, 274.3228);
}
GameTextForPlayer(playerid,"~w~ Las Ventruas",3000,1);
SCM(playerid, ServerColors[random(sizeof(ServerColors))], "Welcome - LV [Las Ventruas]");
SetPlayerInterior(playerid, 0);
return 1;
}