void BuyCommand(int aIndex,char* Message){
OBJECTSTRUCT* gObj = (OBJECTSTRUCT*)(aIndex * OBJECT_SIZE + OBJECT_BASE);
if(strlen(Message) < 1)
{
GCServerMsgStringSend("Usage: /buy knightblade",aIndex,1);
}
if(strcmp(Message, "knightblade")==0) {
ItemSerialCreateSend(aIndex,gObj->MapNumber,gObj->X,gObj->Y,20,13,0,1,1,7,aIndex,63,0);
GCServerMsgStringSend("Enjoy your Knight Blade.",aIndex,1);
return;
}
}
- - - Updated - - -
Okay I got it to work.
I want now that the command will check whether the player has 20 PCPoints/resets/anything before it gives him the knight blade, and if he doesn't have 20 he won't get the knight blade.
any help on this one?
I need to get some data from SQL but I don't exactly know how..





