11.02.2011, 01:12
Hi
So i have my level system ready and i wans that so people could export cars and buy levels.
I have my /buylevel command ready but each time i write /buylevel it buys all 3 levels. How could i make it buy one level at a time?
So i have my level system ready and i wans that so people could export cars and buy levels.
I have my /buylevel command ready but each time i write /buylevel it buys all 3 levels. How could i make it buy one level at a time?
Код:
if(strcmp(cmdtext,"/buylevel",true)==0) { if(GetPlayerMoney(playerid) >= 100000 && GetPlayerScore(playerid) == 0) { SetPlayerRank(playerid, 1); SetPlayerScore(playerid, 1); GivePlayerMoney(playerid, -100000); SendClientMessage(playerid, COLOR_GREEN,"Apsveicam! Tu iegādājies 1. līmeni."); } else { if(GetPlayerMoney(playerid) < 100000 && GetPlayerScore(playerid) == 0) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Tev nav pietiekami daudz naudas."); } return 1; } if(GetPlayerMoney(playerid) >= 200000 && GetPlayerScore(playerid) == 1) { SetPlayerRank(playerid, 2); SetPlayerScore(playerid, 2); GivePlayerMoney(playerid, -200000); SendClientMessage(playerid, COLOR_GREEN,"Apsveicam! Tu iegādājies 2. līmeni."); } else { if(GetPlayerMoney(playerid) < 200000 && GetPlayerScore(playerid) == 1) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Tev nav pietiekami daudz naudas."); } return 1; } if(GetPlayerMoney(playerid) >= 300000 && GetPlayerScore(playerid) == 2) { SetPlayerRank(playerid, 3); SetPlayerScore(playerid, 3); GivePlayerMoney(playerid, -300000); SendClientMessage(playerid, COLOR_GREEN,"Apsveicam! Tu iegādājies 3. līmeni."); } else { if(GetPlayerMoney(playerid) < 300000 && GetPlayerScore(playerid) == 2) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Tev nav pietiekami daudz naudas."); } return 1; } return 1; }