26.02.2013, 02:01
Preciso Do Comando /CreateObject Em Zcmd Auguem Ai Me Ajuda
dcmd_object(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /object [object id]");
new object = strval(params), string[128], Float:x, Float:y, Float:z, Float:a;
CMDMessageToAdmins(playerid,"OBJECT");
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
x += (3 * floatsin(-a, degrees));
y += (3 * floatcos(-a, degrees));
CreateObject(object, x, y, z, 0.0, 0.0, a);
format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", object, x, y, z, a);
SaveToFile("Objects",string);
format(string, sizeof(string), "You Have Created Object %d, at %0.2f, %0.2f, %0.2f Angle %0.2f", object, x, y, z, a);
return SendClientMessage(playerid,yellow, string);
} else return SendClientMessage(playerid,red,"ERRO: Vocк nгo tem nнvel alto suficiente para usar este comando");
}
CMD:object(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /object [object id]");
new object = strval(params), string[128], Float:x, Float:y, Float:z, Float:a;
CMDMessageToAdmins(playerid,"OBJECT");
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
x += (3 * floatsin(-a, degrees));
y += (3 * floatcos(-a, degrees));
CreateObject(object, x, y, z, 0.0, 0.0, a);
format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", object, x, y, z, a);
SaveToFile("Objects",string);
format(string, sizeof(string), "You Have Created Object %d, at %0.2f, %0.2f, %0.2f Angle %0.2f", object, x, y, z, a);
return SendClientMessage(playerid,yellow, string);
} else return SendClientMessage(playerid,red,"ERRO: Vocк nгo tem nнvel alto suficiente para usar este comando");
}
PHP код:
|
CMD:object(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /object [object id]");
new object = strval(params), string[128], Float:x, Float:y, Float:z, Float:a;
CMDMessageToAdmins(playerid,"OBJECT");
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
x += (3 * floatsin(-a, degrees));
y += (3 * floatcos(-a, degrees));
CreateObject(object, x, y, z, 0.0, 0.0, a);
format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", object, x, y, z, a);
SaveToFile("Objects",string);
format(string, sizeof(string), "You Have Created Object %d, at %0.2f, %0.2f, %0.2f Angle %0.2f", object, x, y, z, a);
return SendClientMessage(playerid,yellow, string);
}
C:\Users\Ricardo e Robert\Desktop\SAMP[0.3x]\gamemodes\UNE.pwn(917) : error 017: undefined symbol "CMDMessageToAdmins" C:\Users\Ricardo e Robert\Desktop\SAMP[0.3x]\gamemodes\UNE.pwn(924) : error 017: undefined symbol "SaveToFile" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
CMD:object(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /object [object id]");
new object = strval(params), string[128], Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
x += (3 * floatsin(-a, degrees));
y += (3 * floatcos(-a, degrees));
CreateObject(object, x, y, z, 0.0, 0.0, a);
format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", object, x, y, z, a);
format(string, sizeof(string), "You Have Created Object %d, at %0.2f, %0.2f, %0.2f Angle %0.2f", object, x, y, z, a);
return SendClientMessage(playerid,yellow, string);
}