dmcd Command in Stock scripten???Pls Help
#1

Hello,

Cann one Script me This Script dmcd Command in Stock?? Pls
dcmd_autospawn(playerid,params[]) {
if(!strlen(params)) return SendClientMessage(playerid,FARBE,"/autospawn FahrzeugID oder Fahrzeugname");
new autonamen[][]= {
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perenniel", "Sentinel", "Dumper", "Feuertruck 1",
"Mьllauto", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Krankenwagen",
"Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Eiswagen", "BF Injection",
"Hunter", "Premier", "Enforcer", "Sicherheitsauto", "Banshee", "Predator", "Bus", "Rhino", "Barracks",
"Hotknife", "Article Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit",
"Romero", "Packer", "Monster Truck", "Admiral", "Squallo", "Seasparrow", "Pizzaboy", "Tram",
"Article Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbad", "Yankee", "Caddy", "Soliar",
"Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
"Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Kuestenwache", "Dinghy", "Hermes", "Sabre",
"Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage",
"Dozer", "Maverick", "SAN News Maverick", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax",
"Hotring Racer 1", "Sandking", "Balista Compact", "Polizei Maverick", "Boxville", "Benson", "Mesa",
"RC Goblin", "Hotring Racer 2", "Hotring Racer 3", "Bloodring Banger", "Rancher", "Super GT", "Elegant",
"Journey", "Fahrrad", "Mountain Bike", "Beagle", "Cropduster", "Stuntflugzeug", "Benzin Tanker",
"Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV-1000",
"Zement Truck", "Abschlepper", "Fortune", "Cadrona", "FBI Truck", "Willard", "Gabelstabler",
"Traktor", "Maehdrescher", "Feltzer", "Remington", "Slamvan", "Blade", "Brownstreak", "Freight",
"Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Feuertruck 2", "Hustler", "Intruder", "Primo",
"Cargobob", "Tampa", "Sunrise", "Merit", "Utility Van", "Nevada", "Yosemite", "Windsor",
"Monster Truck", "Monster Truck", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
"RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat Trailer", "Streak Trailer",
"Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT400", "DFT-30", "Huntley", "Stafford",
"BF-400", "Nachrichten Van", "Tug", "Benzin Anhaenger", "Emperor", "Wayfarer", "Euros", "Hotdog",
"Club", "Freight Box Trailer", "Article Trailer 3", "Andromada", "Dodo", "RC Cam", "Launch",
"Polizeiauto LSPD", "Polizeiauto SFPD", "Polizeiauto LVPD", "Ranger", "Picador", "Wasserwerfer",
"Alpha", "Phoenix", "Glendale Shit", "Sadler Shit", "Baggage Trailer 1", "Baggage Trailer 2",
"Tug Stairs Trailer", "Boxburg", "Farm Trailer", "Utility Trailer" }, id, geht;
for(new i, j=strlen(params); i<j; i++) {
if((params[i]<0 || params[i]>9) && params[i]!=' ') {
geht++;
i=j; }}
if(!geht) {
id=strval(params); }
else {
for(new m=0; m<211; m++) {
if(strfind(autonamen[m],params,true)==0) {
id=m+400; }}}
if(id>=400 && id<=611) {
new Float, Float:y, Float:z, gla, Float:za, s[50];
format(s,sizeof(s),"Du hast eine/n %s gespawnt",autonamen[id-400]);
SendClientMessage(playerid,FARBE,s);
GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,za);
gla=CreateVehicle(id,x+2,y,z,za,random(127),random (127),-1);
LinkVehicleToInterior(gla,GetPlayerInterior(player id)); }
else { SendClientMessage(playerid,rot,"Inkorrekte Fahrzeug ID"); }
return 1;
}
Reply
#2

1 Moment, just calling everybody to script this for you.
pawn Код:
// /spawn
SpawnPlayer(playerid);

// /north
SetPlayerFacingAngle(playerid, 0.00);
Reply
#3

Lol is not work xD
I have this CMD ^^
if(strcmp(cmdtext, "/north") == 0)
{
SetPlayerFacingAngle(playerid, 0.00);
return 1;
}

Itґs so right?
Pls help me
Reply
#4

Try this:

pawn Код:
SetVehicleZAngle(vehid,360); // North
Reply
#5

So ?
if(strcmp(cmdtext, "/north") == 0)
{
SetVehicleZAngle(vehid,360);
return 1;
}

//Edit: I have this error: C:\Dokumente und Einstellungen\Anwender\Desktop\stunt.pwn(4419) : error 035: argument type mismatch (argument 1)

Error line: SetVehicleZAngle(vehid,360);

Abernathy:

if(strcmp(cmdtext, "/north") == 0)
{
SetPlayerFacingAngle(playerid, 0.00);
return 1;
}
Work perfect ^^ .... Hmm itґs only work on Players isnґt Work in Vehicle
Reply
#6

Untested, but this should work:
Код:
if(strcmp(cmdtext, "/north") == 0) {
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
		SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0);
	}
	else {
		SetPlayerFacingAngle(playerid, 0.0);
	}
	return 1;
}
Reply
#7

Thx

Can one help me wive this CMD?
dcmd_autospawn(playerid,params[]) {
if(!strlen(params)) return SendClientMessage(playerid,FARBE,"/autospawn FahrzeugID oder Fahrzeugname");
new autonamen[][]= {
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perenniel", "Sentinel", "Dumper", "Feuertruck 1",
"Mьllauto", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Krankenwagen",
"Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Eiswagen", "BF Injection",
"Hunter", "Premier", "Enforcer", "Sicherheitsauto", "Banshee", "Predator", "Bus", "Rhino", "Barracks",
"Hotknife", "Article Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit",
"Romero", "Packer", "Monster Truck", "Admiral", "Squallo", "Seasparrow", "Pizzaboy", "Tram",
"Article Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbad", "Yankee", "Caddy", "Soliar",
"Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
"Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Kuestenwache", "Dinghy", "Hermes", "Sabre",
"Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage",
"Dozer", "Maverick", "SAN News Maverick", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax",
"Hotring Racer 1", "Sandking", "Balista Compact", "Polizei Maverick", "Boxville", "Benson", "Mesa",
"RC Goblin", "Hotring Racer 2", "Hotring Racer 3", "Bloodring Banger", "Rancher", "Super GT", "Elegant",
"Journey", "Fahrrad", "Mountain Bike", "Beagle", "Cropduster", "Stuntflugzeug", "Benzin Tanker",
"Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV-1000",
"Zement Truck", "Abschlepper", "Fortune", "Cadrona", "FBI Truck", "Willard", "Gabelstabler",
"Traktor", "Maehdrescher", "Feltzer", "Remington", "Slamvan", "Blade", "Brownstreak", "Freight",
"Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Feuertruck 2", "Hustler", "Intruder", "Primo",
"Cargobob", "Tampa", "Sunrise", "Merit", "Utility Van", "Nevada", "Yosemite", "Windsor",
"Monster Truck", "Monster Truck", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
"RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat Trailer", "Streak Trailer",
"Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT400", "DFT-30", "Huntley", "Stafford",
"BF-400", "Nachrichten Van", "Tug", "Benzin Anhaenger", "Emperor", "Wayfarer", "Euros", "Hotdog",
"Club", "Freight Box Trailer", "Article Trailer 3", "Andromada", "Dodo", "RC Cam", "Launch",
"Polizeiauto LSPD", "Polizeiauto SFPD", "Polizeiauto LVPD", "Ranger", "Picador", "Wasserwerfer",
"Alpha", "Phoenix", "Glendale Shit", "Sadler Shit", "Baggage Trailer 1", "Baggage Trailer 2",
"Tug Stairs Trailer", "Boxburg", "Farm Trailer", "Utility Trailer" }, id, geht;
for(new i, j=strlen(params); i<j; i++) {
if((params<0 || params>9) && params!=' ') {
geht++;
i=j; }}
if(!geht) {
id=strval(params); }
else {
for(new m=0; m<211; m++) {
if(strfind(autonamen[m],params,true)==0) {
id=m+400; }}}
if(id>=400 && id<=611) {
new Float, Float:y, Float:z, gla, Float:za, s[50];
format(s,sizeof(s),"Du hast eine/n %s gespawnt",autonamen[id-400]);
SendClientMessage(playerid,FARBE,s);
GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,za);
gla=CreateVehicle(id,x+2,y,z,za,random(127),random (127),-1);
LinkVehicleToInterior(gla,GetPlayerInterior(player id)); }
else { SendClientMessage(playerid,rot,"Inkorrekte Fahrzeug ID"); }
return 1;
}
I will this in if(strcmp(cmdtext, "/spawn", true) == 0) not in dcmd

When i make so:

if(strcmp(cmdtext, "/spawn", true) == 0) {
if(!strlen(params)) return SendClientMessage(playerid,FARBE,"/autospawn FahrzeugID oder Fahrzeugname");
new autonamen[][]= {
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perenniel", "Sentinel", "Dumper", "Feuertruck 1",
"Mьllauto", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Krankenwagen",
"Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Eiswagen", "BF Injection",
"Hunter", "Premier", "Enforcer", "Sicherheitsauto", "Banshee", "Predator", "Bus", "Rhino", "Barracks",
"Hotknife", "Article Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit",
"Romero", "Packer", "Monster Truck", "Admiral", "Squallo", "Seasparrow", "Pizzaboy", "Tram",
"Article Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbad", "Yankee", "Caddy", "Soliar",
"Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
"Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Kuestenwache", "Dinghy", "Hermes", "Sabre",
"Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage",
"Dozer", "Maverick", "SAN News Maverick", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax",
"Hotring Racer 1", "Sandking", "Balista Compact", "Polizei Maverick", "Boxville", "Benson", "Mesa",
"RC Goblin", "Hotring Racer 2", "Hotring Racer 3", "Bloodring Banger", "Rancher", "Super GT", "Elegant",
"Journey", "Fahrrad", "Mountain Bike", "Beagle", "Cropduster", "Stuntflugzeug", "Benzin Tanker",
"Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV-1000",
"Zement Truck", "Abschlepper", "Fortune", "Cadrona", "FBI Truck", "Willard", "Gabelstabler",
"Traktor", "Maehdrescher", "Feltzer", "Remington", "Slamvan", "Blade", "Brownstreak", "Freight",
"Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Feuertruck 2", "Hustler", "Intruder", "Primo",
"Cargobob", "Tampa", "Sunrise", "Merit", "Utility Van", "Nevada", "Yosemite", "Windsor",
"Monster Truck", "Monster Truck", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
"RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat Trailer", "Streak Trailer",
"Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT400", "DFT-30", "Huntley", "Stafford",
"BF-400", "Nachrichten Van", "Tug", "Benzin Anhaenger", "Emperor", "Wayfarer", "Euros", "Hotdog",
"Club", "Freight Box Trailer", "Article Trailer 3", "Andromada", "Dodo", "RC Cam", "Launch",
"Polizeiauto LSPD", "Polizeiauto SFPD", "Polizeiauto LVPD", "Ranger", "Picador", "Wasserwerfer",
"Alpha", "Phoenix", "Glendale Shit", "Sadler Shit", "Baggage Trailer 1", "Baggage Trailer 2",
"Tug Stairs Trailer", "Boxburg", "Farm Trailer", "Utility Trailer" }, id, geht;
for(new i, j=strlen(params); i<j; i++) {
if((params<0 || params>9) && params!=' ') {
geht++;
i=j; }}
if(!geht) {
id=strval(params); }
else {
for(new m=0; m<211; m++) {
if(strfind(autonamen[m],params,true)==0) {
id=m+400; }}}
if(id>=400 && id<=611) {
new Float, Float:y, Float:z, gla, Float:za, s[50];
format(s,sizeof(s),"Du hast eine/n %s gespawnt",autonamen[id-400]);
SendClientMessage(playerid,FARBE,s);
GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,za);
gla=CreateVehicle(id,x+2,y,z,za,random(127),random (127),-1);
LinkVehicleToInterior(gla,GetPlayerInterior(player id)); }
else { SendClientMessage(playerid,rot,"Inkorrekte Fahrzeug ID"); }
return 1;
}

This Errors

C:\Dokumente und Einstellungen\Anwender\Desktop\stunt.pwn(442 : error 017: undefined symbol "params"
C:\Dokumente und Einstellungen\Anwender\Desktop\stunt.pwn(4457) : error 017: undefined symbol "params"
C:\Dokumente und Einstellungen\Anwender\Desktop\stunt.pwn(445 : error 017: undefined symbol "params"
C:\Dokumente und Einstellungen\Anwender\Desktop\stunt.pwn(4462) : error 017: undefined symbol "params"
C:\Dokumente und Einstellungen\Anwender\Desktop\stunt.pwn(4465) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#8

strcmp doesn't give you 'params'. Use strtok for that
Reply
#9

Step one: don't put such a huge array in each command, simply put it as a global variable
Step two: learn to indent properly
Step three: read this, this, this and this.
Reply
#10

Quote:
Originally Posted by dice7
strcmp doesn't give you 'params'. Use strtok for that
Cann you Script me this in strtok

//Edit: Can anyone script me this in strtok? PLS HELP ME
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)