HELP ME -
MCnunnu - 08.11.2014
Hi i have 2 errors
Код:
if(!strcmp("/stunt", cmdtext, true)) // 1 error line
{
pos = GetPlayerPos(playerid);
SetPlayerPos(playerid,4131.0371,310.5895,5.0703);
}
if(!strcmp("/back", cmdtext, true)) // 2 error line
{
SetPlayerPos(playerid,pos);
}
Re: HELP ME -
MCnunnu - 08.11.2014
error 010: invalid function or declaration
error 010: invalid function or declaration
Re: HELP ME -
Eth - 08.11.2014
try:
pawn Код:
if(!strcmp("/stunt", cmdtext, true) == 0) // 1 error line
{
pos = GetPlayerPos(playerid);
SetPlayerPos(playerid,4131.0371,310.5895,5.0703);
}
if(!strcmp("/back", cmdtext, true) == 0) // 2 error line
{
SetPlayerPos(playerid,pos);
}
also which error are you having?
and where did you put that code?
Re: HELP ME -
MCnunnu - 08.11.2014
error 010: invalid function or declaration
error 010: invalid function or declaration
I put that to gamemode
your code don't work
Re: HELP ME -
Sabur - 08.11.2014
Код:
if(!strcmp("/stunt", cmdtext, true) == 0) // 1 error line
{
new Float: X, Float: Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid,4131.0371,310.5895,5.0703);
}
if(!strcmp("/back", cmdtext, true) == 0) // 2 error line
{
SetPlayerPos(playerid, X, Y, Z);
}
Re: HELP ME -
MCnunnu - 08.11.2014
error 010: invalid function or declaration
error 021: symbol already defined: "GetPlayerPos"
error 021: symbol already defined: "SetPlayerPos"
error 010: invalid function or declaration
now i have
Re: HELP ME -
Sabur - 08.11.2014
add return 1; in the bottom of the each command.
Re: HELP ME -
Sabur - 08.11.2014
Код:
new
Float:aX[MAX_PLAYERS],
Float:aY[MAX_PLAYERS],
Float:aZ[MAX_PLAYERS]; // Global Variables
if(!strcmp("/stunt", cmdtext, true) == 0) // 1 error line
{
GetPlayerPos(playerid, aX[playerid], aY[playerid], aZ[playerid]);
SetPlayerPos(playerid,4131.0371,310.5895,5.0703);
return 1;
}
if(!strcmp("/back", cmdtext, true) == 0) // 2 error line
{
SetPlayerPos(playerid, ax[playerid], aY[playerid], aZ[playerid]);
return 1;
}
Re: HELP ME -
dominik523 - 08.11.2014
I would suggest you to use ZCMD:
https://sampforum.blast.hk/showthread.php?tid=91354
There are bunch of tutorials about how to create commands with it.