/vspawn for admin help... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /vspawn for admin help... (
/showthread.php?tid=442379)
/vspawn for admin help... -
SupermanV - 07.06.2013
Hello guys,
I need a vehicle spawner ONLY for 2+ Administrator Rank. (command to open the spawn menu: /vspawn). I need it a lot...
PLEASE DON'T IGNORE :\
I want just 4 vehicles WITH SIRENS.
(VEHICLES COLORS: PURPLE)
1)Comet (like this: [ame]http://www.youtube.com/watch?v=Lw3W1MRnF5I[/ame]).
2)Quad (The siren will be back!).
3)Tug (like this: [ame]http://www.youtube.com/watch?v=jLEhI7V69co[/ame]).
4)NRG-500 (The siren will be back like Quad).
Look at 0:40 (This is the menu)---> [ame]http://www.youtube.com/watch?v=YIw2RF130KI[/ame]
Thank you very much
Re: /vspawn for admin help... -
Avi57 - 07.06.2013
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");
}
Re: /vspawn for admin help... -
SupermanV - 07.06.2013
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