18.08.2009, 19:41
I have this script that spawns you a car on command. But in places such as arenas it just stays invisible even if it says to link the interior to the vehicle...
EDIT: Its bit messed up, but its not because of that, something in the code
Код:
if(strcmp(cmd, "/aspawncar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not the sufficient administrators rank.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX - /aspawncar [carid]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "IDs must be between 400 and 611."); return 1; }
new Float:XX, Float:YY, Float:ZZ;
GetPlayerPos(playerid, XX,YY,ZZ);
new carsp = CreateVehicle(car, XX,YY,ZZ, 0.0, random(126), random(126), -1);
LinkVehicleToInterior(carsp, GetPlayerInterior(playerid));
}
return 1;
}


