12.09.2010, 00:24
Ta dando erro na linha: SetPlayerHoldingObject(giveplayerid, result, 2);
No result...
Como tirar o erro?
No result...
Como tirar o erro?
pawn Код:
if(strcmp(cmd, "/op", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /op [Id Do Jogador] [id do objeto]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: USE: /op [Id Do Jogador] [id do objeto]");
return 1;
}
new Float:X, Float:Y, Float:Z;
GetPlayerPos(giveplayerid,Float:X, Float:Y, Float:Z);
SetPlayerHoldingObject(giveplayerid, result, 2);
format(string, 256, "Admin %s Botou o Objeto Numero: %s Em: %s",sendername, giveplayer, (result));
ABroadCast(COLOR_YELLOW,string,1);
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d Nгo estб on.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}