SHOW:
|
|
- or go back to the newest paste.
1 | if(strcmp(cmd, "/adminad", true) == 0) | |
2 | { | |
3 | if(IsPlayerConnected(playerid)) | |
4 | { | |
5 | if(PlayerInfo[playerid][pAdmin] >= 8) | |
6 | { | |
7 | new length = strlen(cmdtext); | |
8 | while ((idx < length) && (cmdtext[idx] <= ' ')) | |
9 | { | |
10 | idx++; | |
11 | } | |
12 | - | new offset = idx; |
12 | + | new length = idx; |
13 | - | new result[64]; |
13 | + | new result[72]; |
14 | - | while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) |
14 | + | while ((idx < length) && ((idx - offset) < (sizeof(result) -1))) |
15 | { | |
16 | result[idx - offset] = cmdtext[idx]; | |
17 | idx++; | |
18 | } | |
19 | result[idx - offset] = EOS; | |
20 | if(!strlen(result)) | |
21 | { | |
22 | - | SendClientMessage(playerid, COLOR_GREY, "Type: (/adminad)vertise [advert text]"); |
22 | + | SendClientMessage(playerid, COLOR_GREY, "Type: (/adminad)vertise [advert text] )"; |
23 | return 1; | |
24 | } | |
25 | TextDrawSetString(Ad, result); | |
26 | TextDrawShowForAll(Ad); | |
27 | } | |
28 | } |