rendered paste body// redone from /veh to make into /spawnobject
if(strcmp(cmd, "/spawnobject", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /spawnobject [objectid]");
return 1;
}
new object;
object = strval(tmp);
if(object < 615 || car > 18112) { SendClientMessage(playerid, COLOR_GREY, " Object Number can't be below 615 or above 18112 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new objectid = Createobject(object, X,Y,Z, 0.0, 60000);
CreatedCars[CreatedCar] = objectid;
CreatedCar ++;
format(string, sizeof(string), " object %d spawned.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /spawnobject [objectid]");
return 1;
}
}
return 1;
}