- เครดิต
- 46
- ความรู้
-
- เงิน $
-
- ความดี
-
|
ถ้าคนยังไ่ม่มีตัวแปร public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
เพิ่ม Forward
forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
ถ้ามีแล้วก็ Ctrl+F ไปที่ public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) หรือ เพิ่มไว้ล่างสุด
แบบนี้นะครับ
เนื้อหาถูกซ่อนไว้
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == 16)
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
{
if (PlayerToPoint(6, playerid,2492.6484,-1702.5197,1018.3438))
{
format(string, sizeof(string), "* %s ä´éËÂÔº»×¹ÍÍ¡¨Ò¡¤Åѧ ¾ÃéÍÁ¡Ô¹ÍÒËÒÃä»´éÇÂ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 30, 300);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 18, 2);
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " ¤Ø³äÁèä´éÍÂÙè·ÕèµÍ¹à¡Ô´¢Í§á¡ê§¤ì㹵͹áá !");
return 1;
}
}
else if(PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13)
{
if (PlayerToPoint(6, playerid,307.7400,1122.2672,1083.8828))
{
format(string, sizeof(string), "* %s ä´éËÂÔº»×¹ÍÍ¡¨Ò¡¤Åѧ ¾ÃéÍÁ¡Ô¹ÍÒËÒÃä»´éÇÂ", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 30, 300);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 18, 2);
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " ¤Ø³äÁèä´éÍÂÙè·ÕèµÍ¹à¡Ô´¢Í§á¡ê§¤ì㹵͹áá !");
return 1;
}
} |
|