- เครดิต
- 155
- ความรู้
-
- เงิน $
-
- ความดี
-
|
//----------------------------------[Point]------------------------------------------------
if(strcmp(cmd, "/givepoint", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givepoint [playerid/PartOfName] [point]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 9999)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
PlayerInfo[playa][pPoint] += money;
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, 256, "AdmWarning: %s ä´éãËé Point á¡è %s ¨Ó¹Ç¹ %d point", sendername, giveplayer, money);
SendAdminMessage(COLOR_YELLOW, string);
format(string, 256, "Admin ä´éà¾ÔèÁ Point ãËé¤Ø³¨Ó¹Ç¹ %d point",money);
SendClientMessage(playa,COLOR_DBLUE,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/point", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /point [playerid/PartOfName] [point]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 9999)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
PlayerInfo[playa][pPoint] -= money;
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, 256, "AdmWarning: %s ä´éź Point á¡è %s ¨Ó¹Ç¹ %d point", sendername, giveplayer, money);
SendAdminMessage(COLOR_YELLOW, string);
format(string, 256, "Admin ä´éź Point ãËé¤Ø³¨Ó¹Ç¹ %d point",money);
SendClientMessage(playa,COLOR_DBLUE,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
} |
|