Vehicle Spawner not working. - 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: Vehicle Spawner not working. (
/showthread.php?tid=445851)
Vehicle Spawner not working. -
PerformerFX - 23.06.2013
Whats wrong here?
Код:
ocmd:v(playerid,params[])
{
new fID;
if(sscanf[params,"i",fID))return SendClientMessage(playerid, Rot, "Nutzung: /v [Fahrzeug ID]"); //591
if(fID<400||fID>611)return SendClientMessage(playerid,Rot,"Gibt eine gьltige ID ein. (400-611)");
new Float:X,Float:Y,Float:Z,Float:lol);
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,lol)
new vehicle
vehicle=CreateVehicle(fID,x,y,z,lol,-1,-1,0);
SetVehicleNumberPlate(vehicle,"~>LEGENDARY<~");
PutPlayerInVehicle(playerid, vehicle, 0);
format(string,sizeof(string),"Du hast ein Auto gespawnt!(FahrzeugID :%d)",GetVehicleModel(GetPlayerVehicleID(playerid)));
SendClientMessage(playerid,Rot,string);
return 1;
}
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : error 028: invalid subscript (not an array or too many subscripts): "sscanf"
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : warning 215: expression has no effect
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : warning 215: expression has no effect
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : warning 215: expression has no effect
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : error 001: expected token: ";", but found ")"
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : error 029: invalid expression, assumed zero
C:\Users\Performer\Desktop\Legendary Stunting\gamemodes\mainscript.pwn(591) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
AW: Vehicle Spawner not working. -
Skimmer - 23.06.2013
Here's a typo. There's [ instead (
pawn Код:
if(sscanf[params,"i",fID))
Replace it to:
pawn Код:
if(sscanf(params,"i",fID))