I need help please
#1

I need help again. so here's my problem... first i just made a reserve and callable car.. but now the problem is adding a new account for reserved and the callable car. so here's what i did..

http://pastebin.com/WHKs8EBe

I dunno what's wrong .. can someone help me please?
Reply
#2

http://pastebin.com/x3PQBr9k
Reply
#3

pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_RED 0xAA3333AA

#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

new ad10zcar, isReserved[MAX_PLAYERS];
new ashxz;

public OnFilterScriptInit()
{
    ad10zcar = AddStaticVehicle(562,1485.8141,-693.2712,94.4098,228.1685,0,0);
    ashxz = AddStaticVehicle(562,1460.5796,-635.6774,95.5308,179.8477,1,1);
    AddVehicleComponent(ad10zcar, 1036);
    AddVehicleComponent(ad10zcar, 1040);
    AddVehicleComponent(ad10zcar, 1034);
    AddVehicleComponent(ad10zcar, 1172);
    AddVehicleComponent(ad10zcar, 1149);
    AddVehicleComponent(ad10zcar, 1035);
    AddVehicleComponent(ad10zcar, 1146);
    AddVehicleComponent(ad10zcar, 1079);
    AddVehicleComponent(ashxz, 1074);
    AddVehicleComponent(ashxz, 1149);
    AddVehicleComponent(ashxz, 1172);
    AddVehicleComponent(ashxz, 1036);
    AddVehicleComponent(ashxz, 1040);
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new PlayerName[24];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

    if(newstate == PLAYER_STATE_DRIVER) {
        new Vehicle = GetPlayerVehicleID(playerid);
        if(Vehicle == ad10zcar) {
            if(strcmp(PlayerName,"[USD]Ad10z[Du]",true)) {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, 0xAA3333AA, "This car is reserved for: [USD]Ad10z[Du]");
            }
        }
        if(Vehicle == ashxz) {
            if(strcmp(PlayerName,"PlayerNoob",true)) {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, 0xAA3333AA, "This car is reserved for: [(DKZ)]Ashxz[.PX.]");
            }
        }
    }
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    AddVehicleComponent(ad10zcar, 1036);
    AddVehicleComponent(ad10zcar, 1040);
    AddVehicleComponent(ad10zcar, 1034);
    AddVehicleComponent(ad10zcar, 1172);
    AddVehicleComponent(ad10zcar, 1149);
    AddVehicleComponent(ad10zcar, 1035);
    AddVehicleComponent(ad10zcar, 1146);
    AddVehicleComponent(ad10zcar, 1079);
    AddVehicleComponent(ashxz, 1074);
    AddVehicleComponent(ashxz, 1149);
    AddVehicleComponent(ashxz, 1172);
    AddVehicleComponent(ashxz, 1036);
    AddVehicleComponent(ashxz, 1040);
}

CMD:callmycar(playerid, params[])
{
    if(isReserved[playerid] == 1) {
        new Float:X,Float:Y,Float:Z, tname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, tname, sizeof(tname));
        if(strfind(tname, "[USD]Ad10z[Du]", true) != -1) {
            GetPlayerPos(playerid, X,Y,Z);
            SetVehiclePos(ad10zcar, X+3, Y+3, Z);
        }
    }
    else {
        if(isReserved[playerid] == 1) {
            new Float:X,Float:Y,Float:Z, tname[MAX_PLAYER_NAME];
            GetPlayerName(playerid, tname, sizeof(tname));
            if(strfind(tname, "[(DKZ)]Ashxz[.PX.]", true) != -1) {
                GetPlayerPos(playerid, X,Y,Z);
                SetVehiclePos(ad10zcar, X+3, Y+3, Z);
            }
        }
        else {
            SendClientMessage(playerid, COLOR_RED, "Your name isn't on the reserved list.");
        }
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    new tname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, tname, sizeof(tname));
    if(!strcmp(tname, "[USD]Ad10z[Du]", true)) {
        isReserved[playerid] = 1;
    }
    else {
        isReserved[playerid] = 0;
    }
    return 1;
}
#endif
Reply
#4

Quote:
Originally Posted by Mughul Bacha
View Post
hmmmmmmmmmmmmm
What reply is this. Lol'd
Reply
#5

Quote:
Originally Posted by Mughul Bacha
View Post
hmmmmmmmmmmmmm
Quote:
Originally Posted by Kostas'
View Post
What reply is this. Lol'd
its seems he only post to get more post count
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)