SA-MP Forums Archive
CNN Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CNN Problem (/showthread.php?tid=246442)



CNN Problem - tbedy - 04.04.2011

i want to make faction named CNN, but i dont know how to put cmds: /news and /live

plz help me...
and if you now, how to put vehicle in script using dcmd!

and third question..
if i park some car in game, can I through scriptfiles change car for example, if is there parked infernus to put through scriptfiles that infernus become bullet


Re: CNN Problem - Sascha - 04.04.2011

for the dcmd question:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(vehicle, 7, cmdtext);
  return 0;
}

dcmd_vehicle(playerid, params[])
{
  if(!strlen(params)) return SendClientMessage(playerid, COLOR, "/vehicle [id]");
  new v = strval(params);
  if(v < 400 || v > 611) return SendClientMessage(playerid, COLOR, "Invalid vehicleid");
  new Float:x, Float:y, Float:z, Float:az;
  GetPlayerPos(playerid, x, y, z);
  GetPlayerFacingAngle(playerid, az);
  x += (5.00 * floatsin(-a, degrees));
  y += (5.00* floatcos(-a, degrees));
  CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
  return 1;
}
(hope that works, just wrote it up)

for the rest: I don't really get what you mean


Re: CNN Problem - tbedy - 05.04.2011

any how with this command make more than one car?


Re: CNN Problem - Sascha - 05.04.2011

pawn Код:
dcmd_vehicle(playerid, params[])
{
  if(!strlen(params)) return SendClientMessage(playerid, COLOR, "/vehicle [id]");
  new v = strval(params);
  if(v < 400 || v > 611) return SendClientMessage(playerid, COLOR, "Invalid vehicleid");
  new Float:x, Float:y, Float:z, Float:az;
  GetPlayerPos(playerid, x, y, z);
  GetPlayerFacingAngle(playerid, az);
  x += (5.00 * floatsin(-a, degrees));
  y += (5.00* floatcos(-a, degrees));
  CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
  return 1;
}



Re: CNN Problem - tbedy - 05.04.2011

but i have under OnPlayerCommandText over 15 commands, how to put these all commands in dcmd

all commands for administrators need to put like dcmd commands, how do this...

is better to clear all admin commands and put FS of admin panel ??


Re: CNN Problem - tbedy - 05.04.2011

any help??

plzzzz, answer me on this:

Quote:

but i have under OnPlayerCommandText over 15 commands, how to put these all commands in dcmd

all commands for administrators need to put like dcmd commands, how do this...

is better to clear all admin commands and put FS of admin panel ??