/bike command -
sggassasin - 30.06.2009
im looking for a /bike command so that when the command is typed that it spawns a bike near the player for them
Thx for your time
Re: /bike command -
Grim_ - 30.06.2009
pawn Код:
if(strcmp(cmdtext, "/bike", true) == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateVehicle(481, x, y, z+5, a, 1, 1, 10000);
SendClientMessage(playerid, color, "BMX spawned!");
return 1;
}
Re: /bike command -
refshal - 30.06.2009
pawn Код:
if(strcmp(cmdtext, "/nrg", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]: You already have a Vehicle.");
}
else
{
new Float:X,Float:Y,Float:Z,Float:Angle,VehicleID; GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
VehicleID = CreateVehicle(522,X,Y,Z,Angle,1,-1,-1);
PutPlayerInVehicle(playerid,VehicleID,0);
SetVehicleVirtualWorld(VehicleID, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(VehicleID, GetPlayerInterior(playerid));
}
return 1;
}
Damn, you posted first again. ^_^
But this time our posts looks a bit different.
EDIT: If you want a NRG-500, this should be your command.
Re: /bike command -
sggassasin - 30.06.2009
coob that 0 in..... PutPlayerInVehicle(playerid,VehicleID,0); is the id of the cars right
or is it VehicleID = CreateVehicle(522,X,Y,Z,Angle,1,-1,-1); 522 in this
Re: /bike command -
Abernethy - 30.06.2009
Well, I win.
jks.
pawn Код:
if(strcmp("/bike a", cmdtext, true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(481, x, y, z, 0.0, -1, -1, 90000);
SetPlayerPos(playerid, x, y, z+3);
return 1;
}
if(strcmp("/bike b", cmdtext, true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(510, x, y, z, 0.0, -1, -1, 90000);
SetPlayerPos(playerid, x, y, z+3);
return 1;
}
if(strcmp("/bike c", cmdtext, true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(509, x, y, z, 0.0, -1, -1, 90000);
SetPlayerPos(playerid, x, y, z+3);
return 1;
}
Re: /bike command -
Grim_ - 30.06.2009
No, seat ID 0 = driver.
Re: /bike command -
sggassasin - 30.06.2009
yes u do Abernethy yes u do
Re: /bike command -
refshal - 30.06.2009
Quote:
Originally Posted by sggassasin
yes u do Abernethy yes u do
|
Did you read the small text?
Quote:
Originally Posted by Abernethy
Well, I win. jks.
|
XD
Re: /bike command -
Grim_ - 30.06.2009
Quote:
Originally Posted by Abernethy
Well, I win. jks.
pawn Код:
if(strcmp("/bike a", cmdtext, true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(481, x, y, z, 0.0, -1, -1, 90000); SetPlayerPos(playerid, x, y, z+3); return 1; }
if(strcmp("/bike b", cmdtext, true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(510, x, y, z, 0.0, -1, -1, 90000); SetPlayerPos(playerid, x, y, z+3); return 1; }
if(strcmp("/bike c", cmdtext, true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(509, x, y, z, 0.0, -1, -1, 90000); SetPlayerPos(playerid, x, y, z+3); return 1; }
|
Actually that code would work because you have space in-between the 'bike' and the letter. Thus meaning you'd need strtok. But since you don't the command would return unknown
You lose
Re: /bike command -
Abernethy - 30.06.2009
Quote:
Originally Posted by Swift_
Quote:
Originally Posted by Abernethy
Well, I win. jks.
pawn Код:
if(strcmp("/bike a", cmdtext, true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(481, x, y, z, 0.0, -1, -1, 90000); SetPlayerPos(playerid, x, y, z+3); return 1; }
if(strcmp("/bike b", cmdtext, true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(510, x, y, z, 0.0, -1, -1, 90000); SetPlayerPos(playerid, x, y, z+3); return 1; }
if(strcmp("/bike c", cmdtext, true) == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(509, x, y, z, 0.0, -1, -1, 90000); SetPlayerPos(playerid, x, y, z+3); return 1; }
|
Actually that code would work because you have space in-between the 'bike' and the letter. Thus meaning you'd need strtok. But since you don't the command would return unknown
You lose
|
Mwhahaha /fail. Yeah, I know my code sucked ass compared to ya'll