/veh cmd
#1

Hi could you tell me how to add the /veh cmd for admins in my script?
Reply
#2

Dude its simple...Here.
Reply
#3

I suggest you to learn the basic of pawn. Try scripting easy cmds first /kill /health
Reply
#4

I too suggest the same thing first learn from basics. Anyway i will help you this time. you may change the colors and duration of time of respawning the vehicle if you want.
https://sampwiki.blast.hk/wiki/CreateVehicle
Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>
CMD:veh(playerid,params[])
{
	new id,Float:x,Float:y,Float:z,Float:angle,str[128];
	GetPlayerPos(playerid,x,y,z);
	GetPlayerFacingAngle(playerid,angle);
	if(sscanf(params,"i",id)) return SendClientMessage(playerid,-1,"[ ! ] Usage: /veh <vehicle id>");
	if(pInfo[playerid][pAdmin] == 1) //use your own enum what you use for admins.
	{
	    if(id > 399 && id < 612)
		{
	    	CreateVehicle(id,x+1,y+1,z,angle,-1,-1,-1);
	    	format(str,sizeof(str),"You have spawned vehicle id : %s",id);
	    	SendClientMessage(playerid,-1,str);
		}
		else SendClientMessage(playerid,-1,"Vehicle numbers from 400 to 611 only");
	}
	else return 0;
	return 1;
}
Reply
#5

Quote:
Originally Posted by JohnBlaze1971
Посмотреть сообщение
I too suggest the same thing first learn from basics.
Yet you paste up copy pasteable shit so they can avoid learning at all. Logic.
Reply
#6

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Yet you paste up copy pasteable shit so they can avoid learning at all. Logic.
You mean i copied it from somewhere and posted here? Gal dude.
Reply
#7

Quote:
Originally Posted by JohnBlaze1971
Посмотреть сообщение
You mean i copied it from somewhere and posted here? Gal dude.
Still reaffirms my statement, that what you're doing, isn't helping.
Reply
#8

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Still reaffirms my statement, that what you're doing, isn't helping.
And what YOU do isn't helping either. I haven't seen you helping a single person on this forum beside a VERY few [was checkpoints IDs.. and all you did was post the wiki link], yet every single post of yours is "We can't give you code, you need to go learn the basics". Damn dude, great job. I suggest putting that sentence in a bind so you wouldn't get tired writing the same exact thing every time. Your replies honestly are as useless as anyone else who posts copy/paste code. At least give some direct links to what they should read concerning their question. This section is called 'Scripting Help', meaning if someone needs help, they come here & ask and and we as helpers, post the answer and not tell them to go to learn how to script. At least the guy above you TRIED to do something, did some 'effort' beside typing a sentence.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)