Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Always Show [Error]:Invalid Weapon ID

$
0
0
Hello When I use The Command And Type The Weapon it It Says Invalid Weapon Id Always
Like If i Used /eweapon1 10 This it Show Invalid Weapon Id

Here's The Code
Code:

CMD:eweapon1(playerid,params[])
{
  if (udb_Exists(PlayerName2(playerid)))
    {
        PlayerInfo[playerid][Level] = (dUserINT(PlayerName2(playerid)).("Level"));
        }
    if(PlayerInfo[playerid][Level] < 6) return SendClientMessage(playerid,COLOR_YELLOW,"You are not allowed to use this command.");
    if(sscanf(params,"u",params[0])) return SendClientMessage(playerid,COLOR_YELLOW,"[USAGE]: /eweapon1 [weapon id]");
    if(params[0] < 0 || params[0] > 42) return SendClientMessage(playerid,COLOR_YELLOW,"[ERROR]: Invalid Weapon Id");
    eInfo[eWeaps][0] = params[0];
    SendClientMessageToAll(COLOR_YELLOW,"Weapon 1 For Event Have Been Set.");
    return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>