SA-MP Forums Archive
Car-House system problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car-House system problem (/showthread.php?tid=387783)



Car-House system problem - PAWNO-ANFДNGER - 26.10.2012

Hello,

I work on my own Car-House system.
but i have a problem, and I dont know, what I do wrong.(sry for my english),
//edit 2
I dont know, what I write in "response".

Mistake-Code
PHP код:
Line (121): Unknown variable"response" 
Code where is the error
PHP код:
//DIALOG_DEFINE
#define DIALOG_CARHOUSEBUY 0
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER)
    {
    for(new 
0i<sizeof(grotticars);i++)
    {
    if(
GetPlayerVehicleID(playerid) == grotticars[i])
    {
        
OnDialogResponse(playeridCARHOUSEBUYresponselistiteminputtext[]) //somewhere there must be error //
    
}
    else
    {
    }
    }
    }
    return 
1;

Help is cool!


//Edit 3 Clock: 14:49
New error...
Car-system works, but little warning :O

PHP код:
Line (341): The number of parameters are incorrect 
Code:
PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    for(new 
0sizeof(grotticars); i++)
    {
    if(
OnPlayerEnterVehicle(playeridvehicleid) == grotticars[i])//here is the error, but I dont can find him :o
    
{
        
TogglePlayerControllable(playeridtrue);
    }
    else
    {
    }
    } 
This code is much longer, I took only that with the Carhouse-system, where is the error, if you want more code, iґll copy that from my gammode )


Re: Car-House system problem - Abhishek. - 26.10.2012

insted of useing there dialogid keep a real id like
pawn Код:
#define DIALOG_HOUSE 0
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i<sizeof(grotticars);i++)
    {
    if(GetPlayerVehicleID(playerid) == grotticars[i])
    {
        OnDialogResponse(playerid,DIALOG_HOUSE, response, listitem, inputtext[]) //somewhere there must be error
    }
    else
    {
    }
    }
    }
    return 1;
}



AW: Car-House system problem - PAWNO-ANFДNGER - 26.10.2012

Ouuuh, Iґm sorry
My mistake Thx !!!


AW: Car-House system problem - PAWNO-ANFДNGER - 26.10.2012

new error..
Iґm sorry..
PHP код:
Line (121): Unknown variable "response" 



Re: Car-House system problem - ikbenremco - 26.10.2012

https://sampwiki.blast.hk/wiki/OnDialogResponse


AW: Car-House system problem - PAWNO-ANFДNGER - 26.10.2012

Finish Thx for help!


AW: Car-House system problem - PAWNO-ANFДNGER - 26.10.2012

deleted, new error is on the top