SA-MP Forums Archive
Hello.. Need help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hello.. Need help. (/showthread.php?tid=203939)



Hello.. Need help. - trapped1 - 28.12.2010

Hello every one I need help about one cmd....

Код:
   
 
if(!strcmp(cmdtext,"/giverespect", true,2))
    {
       if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /giverespect");
       if(gTeam[playerid] != TEAM_GROVE) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");

       if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
       GetPlayerName(playerid, playername, sizeof(playername));
       format(string, sizeof(string), "* *Groove [%s]: %s,", playername, cmdtext[2]);
       for(new i = 0; i < MAX_PLAYERS; i++) {
       }
       return 1;
       }
This command need to give team mate +1 respect. How to do that...


Re: Hello.. Need help. - _rAped - 28.12.2010

I'm not really sure why you got the foreach and the format there?

Edit: When a player types /giverespect, all the member of TEAM_GROVE will get +1 score?


Re: Hello.. Need help. - blackwave - 28.12.2010

use dcmd or sscanf. Easiest way.


Re: Hello.. Need help. - MadeMan - 28.12.2010

https://sampwiki.blast.hk/wiki/Fast_Commands


Re: Hello.. Need help. - trapped1 - 28.12.2010

thanks yeah I needed Player gives +1 respect point to player..


Re: Hello.. Need help. - _rAped - 28.12.2010

Quote:
Originally Posted by trapped1
Посмотреть сообщение
thanks yeah I needed Player gives +1 respect point to player..
Aha. So I guess you got this sorted then?


Re: Hello.. Need help. - trapped1 - 28.12.2010

Yes.. Just its not working how I was imaged and ye....