PDA

View Full Version : /changecrank help


Jordiee
24/11/2011, 11:07 PM
This is my /g(roup) command:
CMD:group(playerid, params[]) {

if(playerVariables[playerid][pStatus] != 1 || playerVariables[playerid][pGroup] < 1) return 1;
if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 0 || groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2) {
return SendClientMessage(playerid, COLOR_GREY, "This group does not have an OOC chat.");
}
new
string[128];

if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/g(roup) [message]");

if(playerVariables[playerid][pFreezeType] > 0) {
return SendClientMessage(playerid, COLOR_GREY, "You can't use this command while cuffed, tazed, or frozen.");
}

GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);

switch(playerVariables[playerid][pGroupRank]) {

case 1: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName1], szPlayerName, params);
case 2: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName2], szPlayerName, params);
case 3: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName3], szPlayerName, params);
case 4: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName4], szPlayerName, params);
case 5: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName5], szPlayerName, params);
case 6: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName6], szPlayerName, params);
default: format(string, sizeof(string), "(Group Chat) %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName1], szPlayerName, params);
}
SendToGroup(playerVariables[playerid][pGroup], COLOR_DCHAT, string);
return 1;
} FINNALLY GOT IT WORKING :D

And I was wondering How to make it like this:
(Group Chat) [[[(Null)]]] Sheriff Carl_Summers: where it says Null, you can change that to whatever you want with a /changecrank command.. Is there anyway of doing it?

Alberto_DR
25/11/2011, 12:14 AM
try using a variable to contain it but I guess its better to use a specific rank name on a rank.

Jordiee
25/11/2011, 06:36 AM
I dunno nothing about Variable's as im new to scripting, can you help me out a little.

Jordiee
25/11/2011, 07:27 AM
Can someone help me? :D

Mr_Scripter
25/11/2011, 07:31 AM
is it fixed?

Jordiee
25/11/2011, 07:32 AM
Nope.

Jordiee
25/11/2011, 10:48 AM
anyone know how to do this?