SA-MP Forums Archive
Convert command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Convert command (/showthread.php?tid=495145)



Convert command - ponagandlamanoj - 16.02.2014

Guys, Can anypne please convert this command to dcmd_lift format... Please

Command to be converted:
Код:
{
if(strcmp("/lift", cmdtext, true) == 0)
{
   if(IsPlayerInRangeOfPoint(playerid, 50, -2464.9296875,1522.9167480469,27.570457458496))
   {
   MoveObject(boatlift,-2464.9296875,1522.9167480469,27.570457458496, 2.0);
   SetTimer("gate1",35000,false);
   return 1;
   }
   else
   {
   SendClientMessage(playerid, COLOR_DARKORANGE, "You Are Not Close Enough To The Lift(San Fierro Freight Boat)");
   return 1;
   }
}  return 0;
}



Re: Convert command - Avi Raj - 16.02.2014

pawn Код:
public OnPlayerCommandText
{
dcmd(lift, 4, cmdtext);
return 1;
}

dcmd_lift(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 50, -2464.9296875,1522.9167480469,27.570457458496))
   {
   MoveObject(boatlift,-2464.9296875,1522.9167480469,27.570457458496, 2.0);
   SetTimer("gate1",35000,false);
   return 1;
   }
   else
   {
   SendClientMessage(playerid, COLOR_DARKORANGE, "You Are Not Close Enough To The Lift(San Fierro Freight Boat)");
   return 1;
   }
    return 0;
}



Re: Convert command - CuervO - 16.02.2014

This is not the script request section, though.

It took me five seconds to ****** this: "converting strcmp to dcmd"

https://sampforum.blast.hk/showthread.php?tid=231496 as first result.