Quote:
Originally Posted by Torran
Quote:
Originally Posted by Chrham_2
Quote:
Originally Posted by Torran
A good way would be to use sscanf
|
Naahh.. I solved it.. It was as simple as:
pawn Код:
if(strcmp(cmdtext, "/makecop", true) == 0) { new tmp[256]; new idx; new giveplayerid; if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /makecop [playerid]"); } if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { CopMake(giveplayerid); } } } return 1; }
|
With sscanf you could do it better and it would save alot of lines
|
Unfortunately I do not know about sscanf.