[Pomoc] Skin

Započeo Matteo, Septembar 25, 2010, 12:32:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Dobar dan.. Evo zanima me komanda neka vrlo jednostavna, kako da ja dam nekom skin... Ne on sam sebi nego ja (admin) njemu... Pomoc. Hvala unaprijed!

Evo ti komanda ;)
   
if(strcmp(cmd, "/staviskin", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /staviskin [playerid/Dio Imena] [skin id]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Pogresan id skina"); return 1; }
         if (PlayerInfo[playerid][pAdmin] >= 5)
         {
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));

                  PlayerInfo[para1][pChar] = level;
                  format(string, sizeof(string), "** Administrator %s je promijenio tvoj Skin.", sendername);
                  SendClientMessage(para1, TEAM_GROVE_COLOR, string);
                  format(string, sizeof(string), "** Odobrili ste %s skin broj %d.", giveplayer,level);
                  SendClientMessage(playerid, COLOR_ORANGE, string);
                     format(string, sizeof(string), "[ADMIN]: %s je dao Skin [%d] %s (%d).",sendername, level, giveplayer, para1);
                  ABroadCast(COLOR_LIGHTRED,string, 5);
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
                   new y, m, d;
                  new h,mi,s;
                  getdate(y,m,d);
                  gettime(h,mi,s);
                  format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Gave The Skin [%d] to %s",d,m,y,h,mi,s,sendername,level,giveplayer);
                  GiveLog(string);
               }
            }//nisi konektovan
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi u mogucnosti koristiti ovu komandu!");
         }
      }
      return 1;
   }

black_dota


Citat: Killer poslato Septembar 25, 2010, 12:55:54 POSLE PODNE
Evo ti komanda ;)
   
if(strcmp(cmd, "/staviskin", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /staviskin [playerid/Dio Imena] [skin id]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Pogresan id skina"); return 1; }
         if (PlayerInfo[playerid][pAdmin] >= 5)
         {
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));

                  PlayerInfo[para1][pChar] = level;
                  format(string, sizeof(string), "** Administrator %s je promijenio tvoj Skin.", sendername);
                  SendClientMessage(para1, TEAM_GROVE_COLOR, string);
                  format(string, sizeof(string), "** Odobrili ste %s skin broj %d.", giveplayer,level);
                  SendClientMessage(playerid, COLOR_ORANGE, string);
                     format(string, sizeof(string), "[ADMIN]: %s je dao Skin [%d] %s (%d).",sendername, level, giveplayer, para1);
                  ABroadCast(COLOR_LIGHTRED,string, 5);
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
                   new y, m, d;
                  new h,mi,s;
                  getdate(y,m,d);
                  gettime(h,mi,s);
                  format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Gave The Skin [%d] to %s",d,m,y,h,mi,s,sendername,level,giveplayer);
                  GiveLog(string);
               }
            }//nisi konektovan
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi u mogucnosti koristiti ovu komandu!");
         }
      }
      return 1;
   }

imas koji jednostavniji, meni treba samo za nogomet, znaci moze svaki skin komanda nije problem

black_dota

pa kucas npr /staviskin jovan_jovicic 123 npr
a nekontam kako nogometni

pawno mi an ovo izbaca milju nepoznatih rijeci... treba mi nes jednostavno

SetPlayerSkin (playerid, playerid2, idskina) // nesto tome slicno, no ovo ne radi :(

black_dota

pa kopiras ovo ispod onplayercommandtext ???