Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

I am having an issue with my code

This is my code, this code is of creating an organization vehicle but it says Unknown Command

ID
d6ouivnilegovhg7c1r0
author
rs-venom's avatar

[Rs]VeNoM

@rs-venom


View profile
Copy link
  Report member
started
Dec 1, 2023
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
I am having an issue with my code
rs-venom's avatar

[Rs]VeNoM

@rs-venom


View profile
Copy link
  Report member
• 2y
Pawn Scripting

I am having an issue with my code

pawn

This is my code, this code is of creating an organization vehicle but it says Unknown Command

CMD:setorgveh(playerid,params[])

{
new orgid, vid;
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(params,"ui",orgid, vid)) return SendClientMessage(playerid, 0xFF4500AA, "USAGE:/setorgveh <orgid> <vid>");

new Float:X,Float:Y,Float:Z,Float:A;
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,0xFF4500AA,"You aren't in any vehicle.");
    GetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
    GetVehicleZAngle(GetPlayerVehicleID(playerid),A);

    if(vid == 1)
    {
    OrgData[orgid][car1] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,60);
    }

    if(vid == 2)
    {
    OrgData[orgid][car2] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }

    if(vid == 3)
    {
    OrgData[orgid][car3] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }
    if(vid == 4)
    {
    OrgData[orgid][car4] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }
    if(vid == 5)
    {
    OrgData[orgid][car5] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }


    new sl[256];
    format(sl,256,"** You have set vehicle id %d to organization vehicle, %s (Carid:%d).",GetVehicleModel(GetPlayerVehicleID(playerid)),vid);
    SendClientMessage(playerid,0x808000AA,sl);

return 1;
}



Full code : https://pastebin.com/KXLubSGP

0 likes0 replies

    Please sign up or log in to reply