31.03.2011, 14:55
I am using a system where you can have one car, but I want to do that you can have two. And puts on only one car. How to do that puts two cars? This is a bad scripts. Thanks!!
Код:
stock Check(playerid) { if(IsPlayerConnected(playerid)) { for(new i = 1; i < sizeof(CarInfo); i++) { new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); if(strcmp(playername,CarInfo[i][cOwner],true)==0) { playerDB[playerid][tr] = i; return i; } } } return 1; }
Код:
stock Check2(playerid) { if(IsPlayerConnected(playerid)) { for(new i = 1; i < sizeof(CarInfo); i++) { new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); if(strcmp(playername,CarInfo[i][cOwner],true)==0) { //this place is bad for me if(playerDB[playerid][tr]!=i) { playerDB[playerid][tr2] = i; } return i; } } } return 1; }