SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 25/02/2009, 01:35 PM   #1
Faust
Little Clucker
 
Join Date: Jan 2008
Posts: 14
Reputation: 3
Default 'SERVER: Unknown command' after used DestroyVehicle();

So I have this little function in my gamemode:
Code:
public OnPlayerDeath(playerid)
{
	DestroyVehicle(Veh[playerid]);
}
But after it's used/when player has died, none of commands work. When I type a command I get this error 'SERVER: Unknown command.'
Why it's that?
Faust is offline  
Old 25/02/2009, 02:03 PM   #2
Norn
High-roller
 
Norn's Avatar
 
Join Date: Jul 2008
Location: Northern Ireland
Posts: 2,265
Reputation: 206
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

Quote:
Originally Posted by Faust
So I have this little function in my gamemode:
Code:
public OnPlayerDeath(playerid)
{
	DestroyVehicle(Veh[playerid]);
}
But after it's used/when player has died, none of commands work. When I type a command I get this error 'SERVER: Unknown command.'
Why it's that?
pawn Code:
public OnPlayerDeath(playerid)
{
    DestroyVehicle(Veh[playerid]);
return 1;
}
__________________
Pursuing other endeavours.

Skype: datinvictusguy
Norn is offline  
Old 25/02/2009, 02:07 PM   #3
Faust
Little Clucker
 
Join Date: Jan 2008
Posts: 14
Reputation: 3
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

Already tried that and still commands don't work.
Faust is offline  
Old 25/02/2009, 02:08 PM   #4
Killerkid
Big Clucker
 
Join Date: Sep 2006
Location: UK
Posts: 197
Reputation: 1
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

OnPlayerDeath has 3 parameters, you would have known that if you read the warnings, they're there for a reason and you may need to return OnPlayerDeath.
Not sure if it is bad to destroy a vehicle that doesn't not exist but I couldn't find any function to check.
Try this:

pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    DestroyVehicle(Veh[playerid]);
    return 1;
}
Killerkid is offline  
Old 25/02/2009, 02:21 PM   #5
Faust
Little Clucker
 
Join Date: Jan 2008
Posts: 14
Reputation: 3
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

If there would be any warnings .. I had no errors.
Tried your version too, but again there isn't any changes.

Faust is offline  
Old 25/02/2009, 02:24 PM   #6
Coicatak
Huge Clucker
 
Join Date: Nov 2008
Posts: 318
Reputation: 0
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

Where you put Veh[MAX_PLAYERS] ?
Coicatak is offline  
Old 25/02/2009, 02:32 PM   #7
Faust
Little Clucker
 
Join Date: Jan 2008
Posts: 14
Reputation: 3
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

On top of the script where is all define thingies.
Faust is offline  
Old 25/02/2009, 02:36 PM   #8
Coicatak
Huge Clucker
 
Join Date: Nov 2008
Posts: 318
Reputation: 0
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

Quote:
Originally Posted by Faust
On top of the script where is all define thingies.
Show us where Veh is updated
Coicatak is offline  
Old 25/02/2009, 02:39 PM   #9
Faust
Little Clucker
 
Join Date: Jan 2008
Posts: 14
Reputation: 3
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

What do you mean by updated? You want to see where it is used?
Faust is offline  
Old 25/02/2009, 03:18 PM   #10
Faust
Little Clucker
 
Join Date: Jan 2008
Posts: 14
Reputation: 3
Default Re: 'SERVER: Unknown command' after used DestroyVehicle();

Anyway, look by yourselfs:
http://pawno.pastebin.com/d5f386270
Faust is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SERVER: Unknown Command when using a scripted command and it does execute! Moustafa Help Archive 6 11/06/2010 01:34 PM
Command that returns SERVER: Unknown Command. pagie1111 Help Archive 11 11/04/2010 09:55 AM
SERVER: Unknown Command - after login on every command virtualmarc Help Archive 0 20/09/2009 06:27 PM
[HELP] Unknown server command Matthew_Murdoch Help Archive 8 27/08/2009 09:04 PM
[Help Please] Server: Unknown Command excale1 Help Archive 1 03/07/2009 03:02 PM


All times are GMT. The time now is 05:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.