Sziasztok!
Miért nem írja ki ha lehívok egy jármûvet hogy: Jármû lekérve! .........
Itt van a script:
CMD:v(playerid, params[])
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid, 0, \"{\"piros\"}Használat: /v [Jármû Név / Jármû ID] [szín 1] [szín 2]\");
new car;
new string[500];
new colour1, colour2;
if(!IsNumeric(tmp))
car = GetVehicleModelIDFromName(tmp);
else car = strval(tmp);
if(car < 400 || car > 611) return SendClientMessage(playerid, 0, \"{\"piros\"}Nincs ilyen jármû!\");
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);
new Float:X,Float:Y,Float:Z;
new Float:Angle,int1;
new LVehicleID = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
int1 = GetPlayerInterior(playerid);
SpawnedVehicles[playerid] = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);
LinkVehicleToInterior(LVehicleID,int1);
PlayerPlaySound(playerid,1085,0,0,0);
PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
format(string, sizeof(string), \"{\"sotetzold\"}|- Jármû lekérve! | Jármû Név: {\"sarga2\"}%s {\"sotetzold\"}| Model ID: {\"sarga2\"}%d {\"sotetzold\"}| Szín 1: {\"sarga2\"}%d {\"sotetzold\"}| Szín 2: {\"sarga2\"}%d {\"sotetzold\"}-|\", VehicleNames[car-400], car, colour1, colour2);
SendClientMessage(playerid,0,string);
return 1;
}