01.01.2010, 23:53
I could explain what did he mean.. He don't want just to spawn a car in one place with StaticVehicle. He wants to spawn vehicle near his location with current ID.. Like /v 402 <--- I love buffalo..
I could suggest you one script.
if(strcmp( cmd, "/vehicle", true ) == 0 )
{
new Float:X, Float:Y, Float:Z;
new tmp[256];
new created_vehicle_id;
tmp = strtok( cmdtext, idx );
GetPlayerPos( playerid, X, Y, Z );
created_vehicle_id = CreateVehicle( strval(tmp), X+2, Y+2, Z, 0, 0, 0, -1 );
new msg[256];
format(msg,256,"Created vehicle: %d",created_vehicle_id);
SendClientMessage(playerid,0xAAAAAAAA,msg);
return 1;
}
But i WARN you.. It does not work. It maby could help you to understand how it will look like. I started to learn Pawno just today.
So i don't know how to fix it.. But the thing i know - i am about to find it out and post the working one like in 2 or 3 hours..
I could suggest you one script.
if(strcmp( cmd, "/vehicle", true ) == 0 )
{
new Float:X, Float:Y, Float:Z;
new tmp[256];
new created_vehicle_id;
tmp = strtok( cmdtext, idx );
GetPlayerPos( playerid, X, Y, Z );
created_vehicle_id = CreateVehicle( strval(tmp), X+2, Y+2, Z, 0, 0, 0, -1 );
new msg[256];
format(msg,256,"Created vehicle: %d",created_vehicle_id);
SendClientMessage(playerid,0xAAAAAAAA,msg);
return 1;
}
But i WARN you.. It does not work. It maby could help you to understand how it will look like. I started to learn Pawno just today.
So i don't know how to fix it.. But the thing i know - i am about to find it out and post the working one like in 2 or 3 hours..