please Correct it - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: please Correct it (
/showthread.php?tid=192637)
please Correct it -
AzTeCaS - 23.11.2010
Код:
if(strcmp(cmdtext, "/v522", true) == 0)
SetPlayerVehicleID(playerid, 522);
SendClientMessage(playerid, 0xFFFFFFAA, "You have Spawn NRG Vehicle");
return 1;
Код:
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\[BWS]Mode.pwn(229) : error 017: undefined symbol "SetPlayerVehicleID"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: please Correct it -
cessil - 23.11.2010
there's no default sa-mp SetPlayerVehicleID, I think you mean to create a vehicle
Re: please Correct it -
Retardedwolf - 23.11.2010
Solution
Re: please Correct it -
iggy1 - 23.11.2010
pawn Код:
if(!strcmp(cmdtext, "/v522"))
{
new
veh,
Float:x,
Float:y,
Float:z,
Float:ang;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, ang);
veh = CreateVehicle(522, x, y, z+0.3, ang, -1,-1,-1);
PutPlayerInVehicle(playerid, veh, 0);
SendClientMessage(playerid, 0xFFFFFFAA, "You have Spawn NRG Vehicle");
return 1;
}
Is how it should be done. Probably better if "veh" is a global array so each player can have a vehicle (and be able to manipulate it)