Hello.. Need help.
#1

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...
Reply
#2

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?
Reply
#3

use dcmd or sscanf. Easiest way.
Reply
#4

https://sampwiki.blast.hk/wiki/Fast_Commands
Reply
#5

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

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?
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)