17.04.2010, 20:14
Sup guys, I'm really new to scripting and i always try some hard things, so here is what im trying to do.
I want to do like an IRC channel, but due that I'm on a ''Roleplay'' script, i want to make a kind of IRC In-Character, named /clan.
Here is my cmd
Would it work?
I want to do like an IRC channel, but due that I'm on a ''Roleplay'' script, i want to make a kind of IRC In-Character, named /clan.
Here is my cmd
Код:
///////////////WALKIE TALKIE TEST//////////////////// if(strcmp(cmd, "/clan", true) == 0 || strcmp(cmd, "/c", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/c)lan [clan chat]"); return 1; } /////CLAN JOIN//// if(strcmp(cmd,"/clanjoin, true) == 0 || strcmp(cmd, "/cj", true) == 0) { if(IsPlayerConnected(playerid)) { new channel = strval(tmp); if(channel < 1 || channel > 3000) { SendClientMessage(playerid, COLOR_GREY, " Clan Number can only be below 1 and 3000 !"); return 1; } channel -= 1; { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /©lan(j)oin [clan channel #]"); return 1; } //////////////////