- 0
Problema /givebonus
-
Similar Content
-
- 0 answers
- 12 views
-
Problema turf
By Soryn.,
- 3 answers
- 275 views
-
- 1 reply
- 180 views
-
Problema
By ImJustSlim,
- 3 answers
- 287 views
-
- 2 replies
- 163 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
gamercs98
Problema intalnita (descriere): Cand dau gen givebonus la celalalte factiuni nu apare pe chat, doar cand folosesc /givebonus la lspd.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):
CMD:givebonus(playerid, params[])
{
new id, suma, string[128];
if(sscanf(params, "ui", id, suma)) return SCM(playerid, -1, "Syntax: /givebonus [playerid] [bonus]");
if(playerVariables[playerid][pGroupRank] == 7)
{
if(id != INVALID_PLAYER_ID)
{
if(playerVariables[playerid][pGroup] == playerVariables[id][pGroup])
{
if(groupVariables[playerVariables[id][pGroup]][gSafe][0] >= suma)
{
format(string, sizeof(string), "{73a2ad}Faction manager %s paid a bonus of $%s to %s.", playerVariables[playerid][pNormalName], NumberFormat(suma), playerVariables[id][pNormalName]);
SendToGroup(1, COLOR_TEAL, string);
// nearByMessage(playerid, COLOR_TEAL, string);
playerVariables[id][pMoney] += suma;
groupVariables[playerVariables[playerid][pGroup]][gSafe][0] -= suma;
// Update(id, pMoney);
}
else
{
SCM(playerid, COLOR_LIGHT, "Your group safe doesn't have enought money!");
}
}
else
{
SCM(playerid, -1, "That player is not in your faction!");
}
}
else
{
SCM(playerid, -1, "That player is not connected!");
}
}
else
{
SCM(playerid, -1, "You have to be a leader to use this command!");
}
return 1;
}
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da, banuiesc ca aici trebuie sa modific SendToGroup(1, COLOR_TEAL, string); dar cum fac sa trimit mesaj nu doar la group 1 si la celalalte cand folosesc /givebonus
Link to comment
Share on other sites
5 answers to this question
Recommended Posts