04.04.2010, 23:29
Good day, evening, morning, night, where ever you are! 
Here is my code:
Now, hard explanation:
Now every player is allowed to do /meow, and thats how its supposed to be.
But now its set like that, that you can do /meow ID, and you get meow, even if the player doesnt have "Meow"
So, what I want is that the player who you try to buy that meow from, HAVE TO HAVE "Meow[playerid] = 50;"
If the player you try to buy meow from does not have "Meow[playerid] = 50;", pops up that "This person doesn't have Meow[playerid] = 50;"
------------------------------------------------
Other explanation:
Here we have cat ID 1, dog ID 2 and snake ID 3. Now the cat has "Meow[playerid] = 50;". The snake has "Meow[playerid = 0;, and the dog has Meow[playerid] = 50; too." Now the dog wants to buy 50 Meow, first he tryis to write /buymeow 3, but he end up with message "This person doesn't have Meow[playerid] = 50;". Now the dog tryes again, now he do /buymeow 1, and the command works, he has succesfully bought 50 Meow.
So, what do I have to add there, and where? 
Dont judge me, im some in new scripting!

Regards,
Assyria =^_^=

Here is my code:
Код:
dcmd_buymeow(playerid, params[])
{
new Money = GivePlayerMoney(playerid,-1000);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
new giveplayerid;
if (sscanf(params, "u", giveplayerid))return SendClientMessage(playerid, 0x6495EDAAA, "Usage: /Buymeow [ID/Name]");
else
if (giveplayerid == INVALID_PLAYER_ID)return SendClientMessage(playerid, 0xFF9900AA, "Wrong name or ID!");
else
if (IsPlayerConnected(playerid))
{
GivePlayerMoney(giveplayerid,Money);
GivePlayerMoney(playerid,1000);
SendClientMessage(giveplayerid,0x24FF0AB9, "You bought meows!!");
SendClientMessage(playerid,0x24FF0AB9, "You have succesfully sold your meows");
SetPlayerDrunkLevel(giveplayerid, 3200);
}
else
{
SendClientMessage(giveplayerid,0xAA0000AA,"This person doens't have Meow[playerid] = 50;");
}
return 1;
}
Now every player is allowed to do /meow, and thats how its supposed to be.
But now its set like that, that you can do /meow ID, and you get meow, even if the player doesnt have "Meow"
So, what I want is that the player who you try to buy that meow from, HAVE TO HAVE "Meow[playerid] = 50;"
If the player you try to buy meow from does not have "Meow[playerid] = 50;", pops up that "This person doesn't have Meow[playerid] = 50;"
------------------------------------------------
Other explanation:
Here we have cat ID 1, dog ID 2 and snake ID 3. Now the cat has "Meow[playerid] = 50;". The snake has "Meow[playerid = 0;, and the dog has Meow[playerid] = 50; too." Now the dog wants to buy 50 Meow, first he tryis to write /buymeow 3, but he end up with message "This person doesn't have Meow[playerid] = 50;". Now the dog tryes again, now he do /buymeow 1, and the command works, he has succesfully bought 50 Meow.
Код:
if Meow[playerid] = 50; ?

Dont judge me, im some in new scripting!

Regards,
Assyria =^_^=

