Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Kiki_Radeon poslato Jun 02, 2010, 23:20:21 POSLE PODNE

Naslov: Jedan mali problemcic /setint Gf edit
Poruka od: Kiki_Radeon poslato Jun 02, 2010, 23:20:21 POSLE PODNE
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;
}


Naslov: Odg: Jedan mali problemcic /setint Gf edit
Poruka od: nastoe poslato Jun 02, 2010, 23:32:37 POSLE PODNE
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;
}
Naslov: Odg: Jedan mali problemcic /setint Gf edit
Poruka od: Kiki_Radeon poslato Jun 02, 2010, 23:39:39 POSLE PODNE
e hvala ti puno..ja muku mucim skidam trazim, a nikako da nadem :S tnx
Naslov: Odg: Jedan mali problemcic /setint Gf edit
Poruka od: nastoe poslato Jun 02, 2010, 23:41:48 POSLE PODNE
Nema na ćemu