- เครดิต
- -12
- ความรู้
-
- เงิน $
-
- ความดี
-
|
กด CTRL+F หา pLevel, เพิ่ม pPoint,
ก็จะได้แบบนี้
pLevel,
pPoint,
หา public OnPlayerUpdate
ใส่ format(var, 32, "pPoint=%d\n",PlayerInfo[playerid][pPoint);fwrite(hFile, var);
หา public OnPlayerLogin
ใส่ if( strcmp( key , "pPoint" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPoint] = strval( val ); }
คำสั่ง
//----------------------------------[pPoint]------------------------------------------------
if(strcmp(cmd, "/pointshop", true) == 0)//
{
if(IsPlayerConnected(playerid))
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xF66C00AA,"l___ Point Shop List ___l");
format(string, sizeof(string), ">Point: คุณมีพ้อย [%d] Point",PlayerInfo[playerid][pPoint]);
SendClientMessage(playerid, 0xF6BE00AA,string);
SendClientMessage(playerid, 0xF6E900AA,">1:Truemoney 50 - ได้ 50 point");
SendClientMessage(playerid, 0xF6E900AA,">2:Truemoney 90 - ได้ 90 point");
SendClientMessage(playerid, 0xF6E900AA,">3:Truemoney 150 - ได้ 150 point");
SendClientMessage(playerid, 0xF6E900AA,">4:Truemoney 300 - ได้ 350 point");
SendClientMessage(playerid, 0xF6E900AA,">3:Truemoney 500 - ได้ 600 point");
SendClientMessage(playerid, 0xF6E900AA,">3:Truemoney 1000 - ได้ 1300 point");
SendClientMessage(playerid, 0xF60000AA,"> สนใจติดต่อที่ Admin ครับ");
SendClientMessage(playerid, 0xF6E900AA,"l__________________________________l");
}
return 1;
}
if(strcmp(cmd, "/givepoint", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 10000)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givepoint [playerid/PartOfName] [จำนวน]");
return 1;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givepoint [playerid/PartOfName] [จำนวน]");
return 1;
}
new playa;
GetPlayerName(playa, sendername, sizeof(sendername));
playa = ReturnUser(tmp);
moneys = strval(tmp);
PlayerInfo[giveplayerid][pPoint] = moneys;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "AdmWarning: %s ได้ให้พ้อยแก่ %s %d พ้อย", sendername,giveplayer,moneys);
ABroadCast(COLOR_YELLOW,string,1);
}
}
return 1;
}
if(strcmp(cmd, "/cashshop", true) == 0)
{
if(IsPlayerConnected(playerid))
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0x0063F6AA,"l___ Cash Shop Lisht___l");
format(string, sizeof(string), ">Point: คุณมีพ้อย [%d] Point",PlayerInfo[playerid][pPoint]);
SendClientMessage(playerid, 0x00B4F6AA,string);
SendClientMessage(playerid, 0x00E5F6AA,">1:/gs1 (โรงรถ(1) >>[150>-Point]<<");
SendClientMessage(playerid, 0x00E5F6AA,">2:/gs2 (โรงรถ (1)(2) >>[200>-Point]<<");
SendClientMessage(playerid, 0x00E5F6AA,">3:/gs3 (โรงรถ (1)(2)(3) >>[250>-Point]<<");
SendClientMessage(playerid, 0x00E5F6AA,">4:/gs4 (โรงรถ(1)(2)(3)(4) >>[300>-Point]<<");
SendClientMessage(playerid, 0x00E5F6AA,">5:/gs5 เงิน 1,000,000$ >>[50>-Point]<<");
SendClientMessage(playerid, 0x00E5F6AA,"l___________________________________________________l");
}
return 1;
}
if (strcmp(cmd, "/gs1", true) == 0)
{
if(PlayerInfo[playerid][pPoint] >= 149)
{
PlayerInfo[playerid][pDonateRank] += 1;
PlayerInfo[playerid][pPoint] -= 150;
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xF61400AA,"คุณได้ซื้อโรงรถ 1 /opg1");
SendClientMessage(playerid, COLOR_YELLOW,"ขอบคุณที่อุดหนุนครับ)");
}
else
{
SendClientMessage(playerid, 0x8D8DFF00, " คุณมีพ้อยไม่พอ !");
}
return 1;
}
if (strcmp(cmd, "/gs2", true) == 0)
{
if(PlayerInfo[playerid][pPoint] >= 249)
{
PlayerInfo[playerid][pDonateRank] += 2;
PlayerInfo[playerid][pPoint] -= 250;
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xF61400AA,"คุณได้ซื้อโรงรถ 1-2 /opg1 - 2");
SendClientMessage(playerid, COLOR_YELLOW,"ขอบคุณที่อุดหนุนครับ)");
}
else
{
SendClientMessage(playerid, 0x8D8DFF00, " คุณมีพ้อยไม่พอ !");
}
return 1;
}
if (strcmp(cmd, "/gs3", true) == 0)
{
if(PlayerInfo[playerid][pPoint] >= 299)
{
PlayerInfo[playerid][pDonateRank] += 3;
PlayerInfo[playerid][pPoint] -= 300;
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xF61400AA,"คุณได้ซื้อโรงรถ 1-3 /opg1 - 3");
SendClientMessage(playerid, COLOR_YELLOW,"ขอบคุณที่อุดหนุนครับ )");
}
else
{
SendClientMessage(playerid, 0x8D8DFF00, " คุณมีพ้อยไม่พอ !");
}
return 1;
}
if (strcmp(cmd, "/gs4", true) == 0)
{
if(PlayerInfo[playerid][pPoint] >= 499)
{
PlayerInfo[playerid][pDonateRank] += 4;
PlayerInfo[playerid][pPoint] -= 500;
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xF61400AA,"คุณได้ซื้อโรงรถ 1-4 /opg1 - 4");
SendClientMessage(playerid, COLOR_YELLOW,"ขอบคุณที่อุดหนุนครับ:)");
}
else
{
SendClientMessage(playerid, 0x8D8DFF00, " คุณมีพ้อยไม่พอ !");
}
return 1;
}
if (strcmp(cmd, "/gs5", true) == 0)
{
if(PlayerInfo[playerid][pPoint] >= 49)
{
SafeGivePlayerMoney(playerid,1000000);
PlayerInfo[playerid][pPoint] -= 50;
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xF61400AA,"·คุณได้ซื้อเงิน 1M ");
SendClientMessage(playerid, COLOR_YELLOW,"ขอบคุณที่อุดหนุนครับ:)");
}
else
{
SendClientMessage(playerid, 0x8D8DFF00, " คุณมีพ้อยไม่พอ !");
}
return 1;
} |
|