- 0
Cum fac comanda whisper la level 4
-
Similar Content
-
- 2 replies
- 2.003 views
-
- 1 answer
- 449 views
-
- 4 replies
- 1.834 views
-
- 3 replies
- 538 views
-
- 2 answers
- 1.044 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.

Question
michael.luciano
Am si eu o problema , vreau sa fac comanda de /whisper de la level 4 si nu stiu cum , ma poate ajuta cineva ?
Comanda /whisper :
[pawn]if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/w)hisper [playerid/PartOfName] [whisper text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
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: (/w)isper [playerid/PartOfName] [whisper text]");
return 1;
}
format(string, sizeof(string), "%s whispers: %s", sendername, (result));
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "%s whispers: %s", sendername, (result));
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}[/pawn]
2 answers to this question
Recommended Posts