- เครดิต
- 113
- ความรู้
-
- เงิน $
-
- ความดี
-
|
if(strcmp(cmd, "/drag", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drag [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, " ¤Ø³äÁèÊÒÁÒö´Ö§à¢Òä´é");
return 1;
}
if(PlayerInfo[playerid][pJailTime] >= 1)
{
SendClientMessage(playerid, 0x33CCFFAA, " äÁèÊÒÁÒöãªé¡Ñºà¢Òä´é");
return 1;
}
if(PlayerCuffed[giveplayerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " ¼ÙéµéͧËÒÂѧäÁèä´éãÊè¡Øá¨Á×Í !");
return 1;
}
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, " ¤Ø³äÁèÊÒÁÒöãÊè¡Øá¨Á×͵ÑÇàͧä´é!"); return 1; }
{
//WantedPoints[giveplayerid] += 6;SetPlayerCriminal(giveplayerid,255, "¦èÒà¨éÒ˹éÒ·Õè");
new car = GetPlayerVehicleID(playerid);
//GetPlayerName(giveplayer, giveplayer, sizeof(giveplayer));
//GetPlayerName(playerid, sendername, sizeof(sendername));
//format(string, sizeof(string), "* %s ä´é´Ö§µÑÇ %s ¢Öé¹Ã¶", sendername ,giveplayer);
//ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//PutPlayerInVehicle(giveplayer, testcar, 4);
PutPlayerInVehicle(giveplayerid, car, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "¼ÙéàÅ蹤¹¹Ñé¹ÍÂÙèä¡ÅÁÒ¡");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " ¼ÙéàÅè¹¹Ñé¹äÁèä´é Online !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " ¤Ø³äÁèãªé µÓÃǨ/FBI/¹ÒÇÔ¡");
}
}
return 1;
}
if(strcmp(cmd, "/hooktocar", true) == 0 || strcmp(cmd, "/hc", true) == 0)
{
new suspect = GetClosestPlayer(playerid);
if(PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pMember] != 19&& PlayerInfo[playerid][pMember] != 21 && PlayerInfo[playerid][pLeader] != 1 && PlayerInfo[playerid][pLeader] != 2 && PlayerInfo[playerid][pLeader] != 19&& PlayerInfo[playerid][pLeader] != 21)
{
SendClientMessage(playerid,COLOR_GRAD1,"¤Ø³äÁèãªè µÓÃǨ/FBI/·ËÒÃ!");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Cannot use this while being in the Car !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"USAGE: /hc [Playerid/PartOfName]");
return 1;
}
if(IsPlayerConnected(suspect))
{
suspect = ReturnUser(tmp);
new carid = GetPlayerVehicleID(playerid);
new seat = 4;
if (ProxDetectorS(8.0, playerid, suspect))
{
if(PlayerCuffed[suspect] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " ¼ÙéµéͧËÒÂѧäÁèä´éãÊè¡Øá¨Á×Í !");
return 1;
}
if(IsACop(suspect))
{
SendClientMessage(playerid, COLOR_GREY, " ¤Ø³äÁèÊÒÁÒö´Ö§ µÓÃǨ/FBI/·ËÒà !");
return 1;
}
new Float:pos[6];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerPos(suspect, pos[3], pos[4], pos[5]);
if (floatcmp(floatabs(floatsub(pos[0], pos[3])), 10.0) != -1 &&
floatcmp(floatabs(floatsub(pos[1], pos[4])), 10.0) != -1 &&
floatcmp(floatabs(floatsub(pos[2], pos[5])), 10.0) != -1) return false;
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s ä´éÅêͤµÑǼÙéµéͧËÒ %s ¢Öé¹Ã¶", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TogglePlayerControllable(suspect, 0);
PutPlayerInVehicle(suspect,carid,seat);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " ¼ÙéµéͧËÒÍÂÙèËèÒ§¨Ò¡¤Ø³ÁÒ¡à¡Ô¹ä» !");
return 1;
}
}
return 1;
} |
|