30.06.2009, 09:23
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
Thx for your time
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;
}
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;
}
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;
}
Originally Posted by sggassasin
yes u do Abernethy yes u do
|
Originally Posted by Abernethy
Well, I win. jks.
|
Originally Posted by Abernethy
Well, I win. jks.
pawn Код:
|
Originally Posted by Swift_
Quote:
You lose |