25.12.2009, 14:22
if i go to any marker with car then its teleports only myself
but how i can make marker what teleports car too?
but how i can make marker what teleports car too?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys == 16) { if(IsInandromana[playerid] > 0) { new Float:X,Float:Y,Float:Z; GetVehiclePos(IsInandromana[playerid], X, Y, Z); SetVehiclePos(GetPlayerVehicleID(playerid, X+4, Y, Z); SetPlayerPos(playerid, X+4, Y, Z); SetPlayerInterior(playerid, 0); IsInandromana[playerid]=0; SetPlayerColor(playerid,COLOR_GREY); } } return 1; }
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(111) : warning 202: number of arguments does not match definition C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(111) : warning 202: number of arguments does not match definition C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(111) : warning 202: number of arguments does not match definition C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(111) : error 001: expected token: ",", but found ";" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Originally Posted by rs2fun111
Код:
SetVehiclePos(GetPlayerVehicleID(playerid, X+4, Y, Z); |
new Float:vX, Float:vY, Float:vZ;
GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ);
SetVehiclePos(GetPlayerVehicleID(playerid), vX+4, vY, vZ);
public OnPlayerEnterCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); new string[256]; new name[128]; GetPlayerName(playerid,name,128); SendClientMessageToAll(COLOR_GREEN, string); new Float:X,Float:Y,Float:Z; GetVehiclePos(IsInandromana[playerid], X, Y, Z); SetPlayerPos(playerid, X+4, Y, Z); new Float:vX, Float:vY, Float:vZ; GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ); SetVehiclePos(GetPlayerVehicleID(playerid), vX+4, vY, vZ); SetPlayerInterior(playerid, 0); SetPlayerColor(playerid,COLOR_PLAYER); return; }
Originally Posted by rs2fun111
but if i go to marker then it isnt teleport player too only teleports car
Код:
public OnPlayerEnterCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); new string[256]; new name[128]; GetPlayerName(playerid,name,128); SendClientMessageToAll(COLOR_GREEN, string); new Float:X,Float:Y,Float:Z; GetVehiclePos(IsInandromana[playerid], X, Y, Z); SetPlayerPos(playerid, X+4, Y, Z); new Float:vX, Float:vY, Float:vZ; GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ); SetVehiclePos(GetPlayerVehicleID(playerid), vX+4, vY, vZ); SetPlayerInterior(playerid, 0); SetPlayerColor(playerid,COLOR_PLAYER); return; } |
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid pX, pY, pZ);
SetPlayerPos(playerid, pX+4, pY, pZ);
Originally Posted by rs2fun111
but i want it teleports car with player
|
new Float:pX, Float:pY, Float:pZ, pV;
pV=GetPlayerVehicleID(playerid);
GetPlayerPos(playerid pX, pY, pZ);
new Float:vX, Float:vY, Float:vZ;
GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ);
SetVehiclePos(GetPlayerVehicleID(playerid), vX+4, vY, vZ);
SetPlayerPos(playerid, pX+4, pY, pZ);
PutPlayerInVehicle(playerid, pV);
public OnPlayerEnterCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); new string[256]; new name[128]; GetPlayerName(playerid,name,128); SendClientMessageToAll(COLOR_GREEN, string); new Float:pX, Float:pY, Float:pZ, pV; pV=GetPlayerVehicleID(playerid); GetPlayerPos(playerid pX, pY, pZ); new Float:vX, Float:vY, Float:vZ; GetVehiclePos(GetPlayerVehicleID(playerid), vX, vY, vZ); SetVehiclePos(GetPlayerVehicleID(playerid), vX+4, vY, vZ); SetPlayerPos(playerid, pX+4, pY, pZ); PutPlayerInVehicle(playerid, pV); SetPlayerInterior(playerid, 0); SetPlayerColor(playerid,COLOR_PLAYER); return; }
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : error 001: expected token: ",", but found "-identifier-" C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : warning 215: expression has no effect C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : warning 215: expression has no effect C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : warning 215: expression has no effect C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : error 001: expected token: ";", but found ")" C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\andromanaint.pwn(78) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.