24.09.2011, 03:17
(
Последний раз редактировалось Andre_Elite; 24.09.2011 в 04:22.
)
Tem como descobrir onde os objetos estгo sу pela cordenada?
if(strcmp("/verobjecto", cmdtext, true, 11) == 0)
{
new
Float:O[3]
;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]");
O[0] = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]");
O[1] = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]");
O[3] = strval(tmp);
SetPlayerCameraPos(playerid, O[0], O[1]-3.0, O[2]);
return 1;
}
C:\DOCUME~1\Andre_2\Desktop\pawn\GAMEMO~1\BSL.pwn(55444) : error 032: array index out of bounds (variable "O") C:\DOCUME~1\Andre_2\Desktop\pawn\GAMEMO~1\BSL.pwn(55445) : error 029: invalid expression, assumed zero C:\DOCUME~1\Andre_2\Desktop\pawn\GAMEMO~1\BSL.pwn(55445) : warning 215: expression has no effect C:\DOCUME~1\Andre_2\Desktop\pawn\GAMEMO~1\BSL.pwn(55445) : error 001: expected token: ";", but found "]" C:\DOCUME~1\Andre_2\Desktop\pawn\GAMEMO~1\BSL.pwn(55445) : error 029: invalid expression, assumed zero C:\DOCUME~1\Andre_2\Desktop\pawn\GAMEMO~1\BSL.pwn(55445) : fatal error 107: too many error messages on one line
SetPlayerCameraPos(playerid, O[0], O[1]-3.0, O[2]);
SetCameraPos(playerid, O[0], O[1]-3.0, O[2]); // se quiser abestado muda pra SetPlayerPos.
if(strcmp("/verobjecto", cmdtext, true, 11) == 0) { new Float:O[3] ; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]"); O[0] = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]"); O[1] = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]"); O[2] = strval(tmp); SetPlayerPos(playerid, O[0], O[1]-3.0, O[2]); // se quiser abestado muda pra SetPlayerPos. return 1; }
Код:
if(strcmp("/verobjecto", cmdtext, true, 11) == 0) { new Float:O[3] ; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]"); O[0] = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]"); O[1] = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /verobjecto [x] [y] [z]"); O[2] = strval(tmp); SetPlayerPos(playerid, O[0], O[1]-3.0, O[2]); // se quiser abestado muda pra SetPlayerPos. return 1; } |