New Command
#1

Код:
	COMMAND:opensdgate(playerid)
	{
	for (new i = 0; i < APPROX_PLAYERS; i++)
	 {
	   if (IsPlayerConnected(i) )
	   {
	     if(gteam[i]==Team_LSPD)
		 { // BCSO PARKING
		 MoveObject(pd1, -232.99, 1214.82, 20.01, 2 ,0.00, 0.00, 180.06);
		 MoveObject(pd2, -232.95, 1214.88, 20.01, 2 ,0.00, 0.00, 180.06);
         }
         }
	return 1;
    }
I get these errors when compiling:
(3677 : error 029: invalid expression, assumed zero
(3677 : error 017: undefined symbol "cmd_opensdgate"
(3677 : error 029: invalid expression, assumed zero
(3677 : fatal error 107: too many error messages on one line
Reply
#2

What command processor are you using?
Reply
#3

Quote:
Originally Posted by Dzines4SAMP
Посмотреть сообщение
What command processor are you using?
D Command
Reply
#4

Quote:
Originally Posted by Cheynoa
Посмотреть сообщение
D Command
DCMD?If you are using DCMD,try this

pawn Код:
dcmd_opensdgate(playerid,params[])
{
    for (new i = 0; i < APPROX_PLAYERS; i++)
     {
       if (IsPlayerConnected(i) )
       {
         if(gteam[i]==Team_LSPD)
         { // BCSO PARKING
         MoveObject(pd1, -232.99, 1214.82, 20.01, 2 ,0.00, 0.00, 180.06);
         MoveObject(pd2, -232.95, 1214.88, 20.01, 2 ,0.00, 0.00, 180.06);
         }  
       }
     }
     return 1;
}
And under OnPlayercommandText add this

pawn Код:
dcmd(opensdgate,10,cmdtext);
Reply
#5

OnPlayerCommandText isn't scripted in to the script.
Reply
#6

So add it.Btw Can you tell us correctly which command processor are uusing?
Reply
#7

The error line was:

pawn Код:
COMMAND:opensdgate(playerid)
This line should be:

pawn Код:
COMMAND:opensdgate(playerid, params[])
So you can try this:

pawn Код:
COMMAND:opensdgate(playerid, params[])
{
    for (new i = 0; i < APPROX_PLAYERS; i++)
    {
       if(IsPlayerConnected(i))
       {
         if(gteam[i]==Team_LSPD)
         { // BCSO PARKING
            MoveObject(pd1, -232.99, 1214.82, 20.01, 2 ,0.00, 0.00, 180.06);
            MoveObject(pd2, -232.95, 1214.88, 20.01, 2 ,0.00, 0.00, 180.06);
         }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)