/car command to spawn Infernus
#1

dfadasdasdasdas
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=413556
Reply
#3

pawn Код:
CMD:car(playerid, params[])
{
    new Float:pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);
    CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200);
    PutPlayerInVehicle(playerid, 411, 0);
}
Reply
#4

To add the optional part:

SendClientMessage(playerid, COLOR_GREEN, "Message here.");
Reply
#5

Quote:
Originally Posted by AphexCCFC
Посмотреть сообщение
pawn Код:
CMD:car(playerid, params[])
{
    new Float:pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);
    CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200);
    PutPlayerInVehicle(playerid, 411, 0);
}
I think this is a bit wrong, it could put you in any infernus across the server. Also, params[] is not needed.
Therefore,
pawn Код:
CMD:car(playerid)
{
    new Float:pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);
    new vehicle = CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200);
    PutPlayerInVehicle(playerid, vehicle, 0);
        SendClientMessage(playerid, -1, "Your infernus has been spawned.");
}
Reply
#6

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
I think this is a bit wrong, it could put you in any infernus across the server. Also, params[] is not needed.
Therefore,
pawn Код:
CMD:car(playerid)
{
    new Float:pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    GetPlayerFacingAngle(playerid, pos[3]);
    new vehicle = CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], 1, 1, 1200);
    PutPlayerInVehicle(playerid, vehicle, 0);
        SendClientMessage(playerid, -1, "Your infernus has been spawned.");
}
Oh yeah, thanks for correcting
Reply
#7

Seems somebody asked my question. Thaanks :3
Reply
#8

dasdsdaddsasd
Reply
#9

Under:

pawn Код:
SendClientMessage(playerid, -1, "Your infernus has been spawned.");
Put:

pawn Код:
return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)