[Pomoc] iz zcmd u sscanf2

Započeo [GU:RP] ivica 156, Februar 09, 2012, 14:29:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:cyber
Detaljan opis problema:kako ovu komandu da prebacim iz zcmd u sscanf2 tj da koristi funkciju sscanf2
CMD:invite(playerid, params[])
      {
       new sendername[MAX_PLAYER_NAME];
      new giveplayer[MAX_PLAYER_NAME];
      new idx;
       new para1;
       new ftext[20];
       new string[128];
       para1 = ReturnUser(temp);
       if(IsPlayerConnected(playerid))
       {
         temp = strtok(params, idx);
         if(!strlen(temp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /invite {959561}[ID/DioImena] {838361}");
            return 1;
         }
         if (PlayerInfo[playerid][Lider] >= 1)
         {
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                   if (PlayerInfo[para1][Clan] == 0 || PlayerInfo[para1][Lider] == 0)
                   {
                     if(PlayerInfo[playerid][Lider] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policija"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
                       else if(PlayerInfo[playerid][Lider] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Federalni Biro"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
                       else if(PlayerInfo[playerid][Lider] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Ballas's Gang"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }
                       else if(PlayerInfo[playerid][Lider] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Bolnica"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
                       else if(PlayerInfo[playerid][Lider] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Ice Cold Family"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
                       else if(PlayerInfo[playerid][Lider] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Terror Squad Crew"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }
                       else if(PlayerInfo[playerid][Lider] == 7) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Gradonacelnik"; ChosenSkin[para1] = 171; SetPlayerSkin(para1, 171); }
                       else if(PlayerInfo[playerid][Lider] ==  8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Glen Park Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
                       else if(PlayerInfo[playerid][Lider] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "RC Novinari"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
                       else if(PlayerInfo[playerid][Lider] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxy Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
                       else if(PlayerInfo[playerid][Lider] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 217; SetPlayerSkin(para1, 217); }
                       else if(PlayerInfo[playerid][Lider] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Yakuza"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110); }
                       else if(PlayerInfo[playerid][Lider] == 13) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Underground Racers"; ChosenSkin[para1] = 29; SetPlayerSkin(para1, 29); }
                       else if(PlayerInfo[playerid][Lider] == 13) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Russian Mafia"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
                       else if(PlayerInfo[playerid][Lider] == 13) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "La Costra Nostra"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }
                       else if(PlayerInfo[playerid][Lider] == 13) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Specijalne Jedinice"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
                        else { return 1; }
                     GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                     GetPlayerName(playerid, sendername, sizeof(sendername));
                     PlayerInfo[para1][Clan] = PlayerInfo[playerid][Lider];
                     PlayerInfo[para1][pRank] = 1;
                     printf("%s je pozvao igraca %s da se prikljuci %s.", sendername, giveplayer, ftext);
                     format(string, sizeof(string), "Prikljucio si se organizaciji %s, pozvao te lider %s", ftext, sendername);
                     SendClientMessage(para1, SVETLOPLAVA, string);
                     format(string, sizeof(string), "Pozvao si %s da se pridruzi %s.", giveplayer,ftext);
                     SendClientMessage(playerid, SVETLOPLAVA, string);
                     SetPlayerInterior(para1,0);
                     new rand = random(sizeof(gInviteSpawns));
                     SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                     SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
                     SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                     SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                     TogglePlayerControllable(para1, 0);
                      SelectChar[para1] = 255;
                      SelectCharID[para1] = PlayerInfo[para1][Clan];
                      SelectCharPlace[para1] = 1;
                     OdjecaID1[para1] = 1;
                      PlayerInfo[para1][pModel] = ChosenSkin[para1];
                      PlayerInfo[para1][pChar] = ChosenSkin[para1];
                      SendClientMessage(para1, COLOR_LIGHTRED, "* Koristi nex da biras skin.");
                      SendClientMessage(para1, COLOR_LIGHTRED, "* Kada odaberes koristi done.");
                      }
               }
            }//not connected
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Igrac je vec u nekoj organizaciji!");
         }
      }
      return 1;
   }
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):