Help me.
#1

C:\Users\Wreeper\Desktop\sal\gamemodes\localhost.p wn(290) : error 010: invalid function or declaration
C:\Users\Wreeper\Desktop\sal\gamemodes\localhost.p wn(293) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


}
if (strcmp("/adabani", cmdtext, true) == 0){
SetTimer("adabani", 10, 0);
}
return 1;
}
if (strcmp("/adaarma", cmdtext, true) == 0){
SetTimer("arma", 10, 0);
}
return 1;
}
Reply
#2

If you want to add commands , you should place their script under OnPlayerCommandText ...
NOTE: OnPlayerCommandText is in your script you should just search it.
For example:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/gooz"cmdtexttrue) == 0)
    {
        
GivePlayerMoney(playerid,2500);
    }
    return 
0;

if it helped please do rep
Reply
#3

Quote:
Originally Posted by taktaz
Посмотреть сообщение
If you want to add commands , you should place their script under OnPlayerCommandText ...
NOTE: OnPlayerCommandText is in your script you should just search it.
For example:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/gooz"cmdtexttrue) == 0)
    {
        
GivePlayerMoney(playerid,2500);
    }
    return 
0;

if it helped please do rep
Yes, it's working one command only, but i will try with the other too. If it works too, i will give you rep. Thx anyway.
Reply
#4

I think you got your answer but still use this.

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/adaarma"cmdtexttrue) == 0)
    {
        
GivePlayerMoney(playerid,2500);
    }
    if (
strcmp("/ada"cmdtexttrue) == 0)
    {
        
GivePlayerWeapon(playerid,WEAPON_SILENCED,1483);
    }
    return 
0;

I don't need +rep
Reply
#5

Quote:
Originally Posted by Wreeper
Посмотреть сообщение
C:\Users\Wreeper\Desktop\sal\gamemodes\localhost.p wn(290) : error 010: invalid function or declaration
C:\Users\Wreeper\Desktop\sal\gamemodes\localhost.p wn(293) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


}
if (strcmp("/adabani", cmdtext, true) == 0){
SetTimer("adabani", 10, 0);
}
return 1;
}
if (strcmp("/adaarma", cmdtext, true) == 0){
SetTimer("arma", 10, 0);
}
return 1;
}
You dont need to use timers , if you want you should use the correct parameters , here is an example:
PHP код:
forward message();
 
public 
OnGameModeInit()
{
    print(
"Starting timer...");
    
SetTimer("message"1000false); // Set a timer of 1000 miliseconds (1 second)
}
 
public 
message()
{
    print(
"1 second has passed.");
}
//Got from samp wiki 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)