CMD:ircoord(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return 1;
new Float:gPos[3];
if(sscanf(params, "fff", gPos[0], gPos[1], gPos[2]))
return
SendClientMessage(playerid, -1, "Uso correto: /ir [x] [y] [z]");
SetPlayerPos(playerid, gPos[0], gPos[1], gPos[2]);
new gString[128];
format(gString, sizeof(gString), "Vocк teleportou para a coordenada {00FF33}%f %f %f{FFFFFF}.", gPos[0], gPos[1], gPos[2]);
SendClientMessage(playerid, -1, gString);
return 1;
}
C:\Users\Pedro\Desktop\LVC\GM\Com Infoorg\Las Venturas City\Las Venturas City\gamemodes\LasVenturas.pwn(39620) : error 029: invalid expression, assumed zero
C:\Users\Pedro\Desktop\LVC\GM\Com Infoorg\Las Venturas City\Las Venturas City\gamemodes\LasVenturas.pwn(39620) : error 017: undefined symbol "cmd_ircoord"
C:\Users\Pedro\Desktop\LVC\GM\Com Infoorg\Las Venturas City\Las Venturas City\gamemodes\LasVenturas.pwn(39620) : error 029: invalid expression, assumed zero
C:\Users\Pedro\Desktop\LVC\GM\Com Infoorg\Las Venturas City\Las Venturas City\gamemodes\LasVenturas.pwn(39620) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
CMD:ircoord(playerid, params[])
1 Dъvida, eu colocando esse codigo em ZCMD nгo irб bugar os outros que nгo sгo em ZCMD nгo ne?
|
//Troque o:
public OnPlayerCommandText(playerid, cmdtext[])
{
//...
}
//Para:
forward OnPlayerCommandTextEx(playerid, cmdtext[]);
public OnPlayerCommandTextEx(playerid, cmdtext[])
{
//...
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)//Callback do ZCMD
{
if(!success) success = OnPlayerCommandTextEx(playerid,cmdtext);
return success;
}
CMD:ircoord(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return 1;
new Float:gPos[3];
if(sscanf(params, "fff", gPos[0], gPos[1], gPos[2]))
return
SendClientMessage(playerid, -1, "Uso correto: /ir [x] [y] [z]");
SetPlayerPos(playerid, gPos[0], gPos[1], gPos[2]);
new gString[128];
format(gString, sizeof(gString), "Vocк teleportou para a coordenada {00FF33}%f %f %f{FFFFFF}.", gPos[0], gPos[1], gPos[2]);
SendClientMessage(playerid, -1, gString);
return 1;
}
OnPlayerCommandText(...)
forward OnPlayerCommandTextEx(...);//E coloca forward em cima.
OnPlayerCommandTextEx(...)
public OnPlayerCommandPerformed(playerid, cmdtext[], success)//Callback do ZCMD
{
if(!success) success = OnPlayerCommandTextEx(playerid,cmdtext);
return success;
}
CMD:ircoord(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 1;
new Float:gPos[3];
if(sscanf(params, "fff", gPos[0], gPos[1], gPos[2])) return SendClientMessage(playerid, -1, "Uso correto: /ir [x] [y] [z]");
SetPlayerPos(playerid, gPos[0], gPos[1], gPos[2]);
new gString[128];
format(gString, sizeof(gString), "Vocк teleportou para a coordenada {00FF33}%f %f %f{FFFFFF}.", gPos[0], gPos[1], gPos[2]);
SendClientMessage(playerid, -1, gString);
return 1;
}