05.06.2012, 13:15
Can someone help me to trans this to ZCMD?
pawn Код:
}
if(!strcmp(cmdtext, "/knock", true)) // By N0FeaR
{
if(IsPlayerConnected(playerid))
{
if(PlayerCuffed[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "You can not do this while cuffed."); return 1; }
if(Died[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Cannot use this command while dead."); return 1; }
new Float:x, Float:y, Float:z,Float:distance = 1.0;
GetPlayerPos(playerid,x,y,z);
if(IsPlayerInRangeOfPoint(playerid,1.0,x,y,z))
PlayAudioStreamForPlayer(playerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,0);
PlayerBubbleMessage(playerid,"knocks on the door.");
new maskid = PlayerInfo[playerid][pMaskID];
for(new s = 0; s < sizeof(Businesses); s++)
{
if(PlayerToPoint(3, playerid,Businesses[s][EnterX], Businesses[s][EnterY], Businesses[s][EnterZ]))
{
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p))
{
if(PlayerToPoint(2, p, Businesses[s][ExitX], Businesses[s][ExitY], Businesses[s][ExitZ]))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
GetPlayerPos(giveplayerid,x,y,z);
if(IsPlayerInRangeOfPoint(giveplayerid,10.0,x,y,z))
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,10);
format(string, sizeof(string), "[DOOR] KNOCK!! KNOCK!! (([Stranger_%d]))", maskid);
SendClientMessage(p, COLOR_PURPLE, string);
}
else
{
GetPlayerPos(giveplayerid,x,y,z);
if(IsPlayerInRangeOfPoint(giveplayerid,10.0,x,y,z))
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,10);
format(string, sizeof(string), "[DOOR] KNOCK!! KNOCK!! ((%s))", GetPlayerNameEx(playerid));
SendClientMessage(p, COLOR_PURPLE, string);
}
}
}
}
}
}
for(new i = 0; i < sizeof(Houses); i++)
{
if(PlayerToPoint(2.0,playerid,Houses[i][EnterX], Houses[i][EnterY], Houses[i][EnterZ]))
{
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p))
{
if(PlayerToPoint(2, p, Houses[i][ExitX], Houses[i][ExitY], Houses[i][ExitZ]))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
GetPlayerPos(giveplayerid,x,y,z);
if(IsPlayerInRangeOfPoint(giveplayerid,10.0,x,y,z))
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,10);
format(string, sizeof(string), "[DOOR] KNOCK!! KNOCK!! (([Stranger_%d]))", maskid);
SendClientMessage(p, COLOR_PURPLE, string);
}
else
{
GetPlayerPos(giveplayerid,x,y,z);
if(IsPlayerInRangeOfPoint(giveplayerid,10.0,x,y,z))
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,10);
format(string, sizeof(string), "[DOOR] KNOCK!! KNOCK!! ((%s))", GetPlayerNameEx(playerid));
SendClientMessage(p, COLOR_PURPLE, string);
}
}
}
}
}
}
}
return 1;