/givecar command help
#1

Hello guys,i need your help.I found this command:
Код:
CMD:givecar(playerid,params[]) { 
    if(PlayerInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid)) { 
        if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /givecar [playerid]"); 
        new player1 = strval(params), playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128]; 
        if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin"); 
     if(IsPlayerInAnyVehicle(player1)) return SendClientMessage(playerid,red,"ERROR: Player already has a vehicle"); 
         if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) { 
            CMDMessageToAdmins(playerid,"GIVECAR"); 
            new Float:x, Float:y, Float:z;    GetPlayerPos(player1,x,y,z); 
            CarSpawner(player1,415); 
            GetPlayerName(player1, playername, sizeof(playername));        GetPlayerName(playerid, adminname, sizeof(adminname)); 
            format(string,sizeof(string),"Administrator %s has given you a car",adminname);    SendClientMessage(player1,blue,string); 
            format(string,sizeof(string),"You have given %s a car", playername); return SendClientMessage(playerid,blue,string); 
        } else return SendClientMessage(playerid, red, "Player is not connected or is yourself"); 
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); 
}
But everytime I give a car to a player,the car is not saved,and when he logs off it disappear!I need a command,giving him pernamently a car,making him the owner of it!

I really appreciate that you read my post,and i want to thank you in advance,hope to hear from you soon!
Reply
#2

none?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)