/back -
argon - 09.07.2009
Hello, forget my YSI topic, help on this.
How to create a /back command, so like, when i use certain cmds defined by me, i can /back and will tele to coordinate before the cmd!!
Dont use hard words please!!
Re: /back -
Kurence - 09.07.2009
for example...
Код:
#include <a_samp>
new X[200],Y[200],Z[200]; //Change 200 to max players on your server
new Float:X2,Float:Y2,Float:Z2;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teleport", cmdtext, true, 10) == 0)
{
GetPlayerPos(playerid,X2,Y2,Z2);
SetPlayerPos(playerid,...);
X[playerid]=X2;
Y[playerid]=Y2;
Z[playerid]=Z2;
return 1;
}
if (strcmp("/back", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,X[playerid],Y[playerid],Z[playerid]);
return 1;
}
return 0;
}
Re: /back -
argon - 09.07.2009
C:\dsf : warning 217: loose indentation
C:\dsf: error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerInfoChange" is not implemented
C:\dsf: warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf: error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerExitVehicle" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerStateChange" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnRconCommand" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf : error 029: invalid expression, assumed zero
C:\dsf: error 004: function "OnObjectMoved" is not implemented
C:\dsf : warning 225: unreachable code
C:\dsf: error 029: invalid expression, assumed zero
C:\dsf : error 004: function "OnPlayerObjectMoved" is not implemented
C:\dsf: warning 225: unreachable code
C:\dsf(966) : error 029: invalid expression, assumed zero
C:\dsf(966) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\dsf(973) : warning 225: unreachable code
C:\dsf(973) : error 029: invalid expression, assumed zero
C:\dsf(973) : error 004: function "OnPlayerExitedMenu" is not implemented
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: /back -
lavamike - 09.07.2009
If you want help with those errors your going to have to post your code on pastebin and include the line numbers of the errors and warnings.
Re: /back -
Correlli - 09.07.2009
You missed a bracket.
Re: /back -
Kurence - 09.07.2009
Quote:
Originally Posted by Don Correlli
You missed a bracket.
|
Terrible!
Re: /back -
argon - 09.07.2009
where?
Re: /back -
Burridge - 09.07.2009
Quote:
Originally Posted by Kurence
Quote:
Originally Posted by Don Correlli
You missed a bracket.
|
Terrible!
|
yes it can be actually, one bracket is the difference between a working script, and one that dosen't!
Re: /back -
argon - 09.07.2009
warning 213: tag mismatch
warning 213: tag mismatch
warning 213: tag mismatch
if (strcmp("/lv", cmdtext, true, 10) == 0)
{
GetPlayerPos(playerid,X2,Y2,Z2);
SetPlayerPos(playerid,2028.5538, 1008.3543, 10.8203);
X[playerid]=X2;
Y[playerid]=Y2;
Z[playerid]=Z2;
return 1;
}
if (strcmp("/back", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,X[playerid],Y[playerid],Z[playerid]);
return 1;
}