Skip to content

Commit fc70fca

Browse files
committed
Added vehicle creation command
1 parent 10d75ce commit fc70fca

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

gamemodes/kutuphane/komutlar.pwn

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
*
1212
*/
1313

14+
new vid = -1;
15+
1416
CMD:mouse(playerid, params[])
1517
{
1618
if(pMouse == false)
@@ -22,4 +24,16 @@ CMD:mouse(playerid, params[])
2224
Mouse(playerid, false, TEXTMOD_YOK);
2325
}
2426
return 1;
27+
}
28+
29+
30+
CMD:veh(playerid, params[])
31+
{
32+
new modelid, Float: Pos[4]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), GetPlayerFacingAngle(playerid, Pos[3]);
33+
if(sscanf(params, "d", modelid)) return Mesaj_Bilgi(playerid, "/veh <model id>");
34+
if(modelid < 411 || modelid > 611) return Mesaj_Hata(playerid, "Incorrect model id.");
35+
if(vid != -1) DestroyVehicle(vid);
36+
vid = CreateVehicle(modelid, Pos[0], Pos[1], Pos[2], Pos[3], -1, -1, -1);
37+
PutPlayerInVehicle(playerid, vid, 0);
38+
return 1;
2539
}

0 commit comments

Comments
 (0)