/vspawn for admin help...
#3

Quote:
Originally Posted by Avi57
Посмотреть сообщение
use this :-
pawn Код:
CMD:vspawn(playerid, params[])
{
 
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be the driver of the vehicle or be onfoot to use this command");
        new aVehicle[64], Color1, Color2;
        if(sscanf(params, "s[64]I(-1)I(-1)", aVehicle, Color1, Color2)) return SendClientMessage(playerid,COLOR_YELLOW, "Correct usage: /car [car ID/name] [color1] [color2]");
        new veh = GetVehicleModelID(aVehicle);
        if(veh < 400 || veh > 611) return SendClientMessage(playerid,COLOR_RED, "ERROR: This is not a valid vehicle name! Please try again ");
        if(IsPlayerInAnyVehicle(playerid)) DestroyVehicle(GetPlayerVehicleID(playerid));
        new Float:Pos[4];
        GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid, Pos[3]);
        new PVeh = CreateVehicle(veh, Pos[0], Pos[1], Pos[2], Pos[3]+90, Color1, Color2, -1);
        LinkVehicleToInterior(PVeh, GetPlayerInterior(playerid));
        SetVehicleVirtualWorld(PVeh, GetPlayerVirtualWorld(playerid));
        PutPlayerInVehicle(playerid, PVeh, 0);
        vehhasmissile[veh] = 0;
        vehhasminigun[veh] = 0;
        vehhascargo[veh] = 0;
        vehhaswindshieldupgrade[veh] = 0;
        vehhascarwreck[veh] = 0;
        SendCommandToAdmins(playerid,"/car");
        GameTextForPlayer(playerid, "~y~Enjoy your new ~r~ride", 2000, 1);
        return 1;
    }
    else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be admin level 2 for using this command");
}
Thanks but I have some questions and errors...

Errors:
Код:
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89526) : error 017: undefined symbol "AdminLevel"
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89531) : error 017: undefined symbol "GetVehicleModelID"
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89540) : error 017: undefined symbol "vehhasmissile"
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89540) : warning 215: expression has no effect
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89540) : error 001: expected token: ";", but found "]"
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89540) : error 029: invalid expression, assumed zero
C:\Users\AnaC\Desktop\h\gamemodes\VGRP.pwn(89540) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Questions:
1) Can you add SIRENS as you can see on the video?

2)Can you add menu with 3 vehicles? (Look on the video)

3)Can you add me on skype please? : gregor.kouk
Reply


Messages In This Thread
/vspawn for admin help... - by SupermanV - 07.06.2013, 08:52
Re: /vspawn for admin help... - by Avi57 - 07.06.2013, 08:54
Re: /vspawn for admin help... - by SupermanV - 07.06.2013, 09:19

Forum Jump:


Users browsing this thread: 1 Guest(s)