Jedan mali problemcic /setint Gf edit

Započeo Kiki_Radeon, Jun 02, 2010, 23:20:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ja pomocu ove komande nemogu drugima namjestit /setint id interior...trazio sam svugdje al nemogu nac /setint za gf koji moze /Setint id drugim igracima
if(strcmp(cmd, "/setint", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setint [interiorid]");
return 1;
}
new intid;
intid = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1||PlayerInfo[playerid][pGameMaster] >= 1)
{
SetPlayerInterior(playerid,intid);
PlayerInfo[playerid][pInt] = intid;
format(string, sizeof(string), "   interiorid %d.", intid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
}
}
return 1;
}



nastoe

Evo skinuo sam jedan mode i nasao.

if(strcmp(cmd, "/setint", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setint [playerid/PartOfName] [interiorid]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
new intid;
tmp = strtok(cmdtext, idx);
intid = strvalEx(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(playa))
    {
        if(playa != INVALID_PLAYER_ID)
        {
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerInterior(playa, intid);
PlayerInfo[playa][pInt] = intid;
format(string, sizeof(string), "   You havae set %s interior to %d.", giveplayer, intid);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "   %s has set your interior to %d.", sendername, intid);
SendClientMessage(playa, COLOR_GRAD1, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Ta komanda je samo za administratore servera!");
}
}
return 1;
}

e hvala ti puno..ja muku mucim skidam trazim, a nikako da nadem :S tnx