Groweed problem
#1

Код:
public GrowWeed(playerid)
  {
  SendClientMessage(playerid,0xffffffaa,"Your plant has grown. Your weed has been harvested.");
  hasweed[playerid]++;
  WeedAlreadyPlanted[playerid] = false;
  return 1;
}
Код:
C:\Documents and Settings\Salim\Desktop\SalsTestinGrounds\SalsTestingGrounds.pwn(762) : warning 235: public function lacks forward declaration (symbol "GrowWeed")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

why did u start another thread for that Sal_King? You should've used the other one to keep it together.

Apologies for missing that out.

Put this Outside the Public.

pawn Код:
forward GrowWeed(playerid);
Reply
#3

Oh ok thanks
You where a big help
Reply
#4

Ok now all we need is the finishing Cherry ...

Please Just make me a /giveweed id ... Basiacly what it will do is give 1 of the weed you have to a other player

This is all i need to finish my Drug System for my server
Reply
#5

pawn Код:
if(!strcmp(cmdtext,"/giveweed",true, 9))
{
  if(!strlen(cmdtext[9])) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /giveweed [playerid]");
  if(hasweed[playerid] <= 0) return SendClientMessage(playerid,0xFF0000AA,"You don't have any weed to give out!");
  new giveid = strval(cmdtext[10]);
  if(!IsPlayerConnected(giveid)) return SendClientMessage(playerid, 0xFF0000AA, "That player isnt connected");
    new string[128], string2[128];
    new adminname[MAX_PLAYER_NAME], bringname[MAX_PLAYER_NAME];
    GetPlayerName(giveid, givename, sizeof(givename));
    GetPlayerName(playerid, adminname, sizeof(adminname));
    format(string,sizeof(string),">> You have given %s 1 unit of weed", givename);
    SendClientMessage(playerid,0xFF8000FF, string);
    format(string2,sizeof(string2),">> You have received 1 unit of weed from %s ", adminname);
    SendClientMessage(giveid,0xFF8000FF, string2);
    GivePlayerMoney(giveid,-1000);
    GivePlayerMoney(playerid, 1000);
    hasweed[giveid]++;
    hasweed[playerid]--;
    return 1;

}
I have made it so that the person who is receiving the weed gets -$1000 and the person selling/giving gets +$1000. Remove those lines if you want. Not Tested

Also, if anyone is thinking, yes i know strtok and dcmd is faster and more efficient etc, so please don't go moaning about it. I'm not too familiar with this at the moment, so if you want, post the strtok/dcmd solution.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)