|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2012
Location: Cebu City Philippines 6000
Posts: 260
Reputation: 14
|
well guys the problem is it wont spaw a car
and i have a warning on my console here it is Code:
[17:48:14] Number of vehicle models: 0 [17:48:24] sscanf warning: Strings without a length are deprecated, please add a destination size. [17:48:27] sscanf warning: Strings without a length are deprecated, please add a destination size. [17:48:31] sscanf warning: Strings without a length are deprecated, please add a destination size. [17:48:35] [17:48:35] [17:48:35] [part] Dan_DelaTorre has left the server (0:1) pawn Code:
|
|
|
|
|
|
#2 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Location: Philippines
Posts: 170
Reputation: 13
|
Code:
CMD:veh(playerid, params[]) {
new
iVehicle,
iColors[2];
if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1])) {
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /veh [model ID] [color 1] [color 2]");
}
else if(!(400 <= iVehicle <= 611)) {
SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid model specified (model IDs start at 400, and end at 611).");
}
else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255)) {
SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid colour specified (IDs start at 0, and end at 255).");
}
else for(new iIterator; iIterator < sizeof(CreatedCars); iIterator++) if(CreatedCars[iIterator] == INVALID_VEHICLE_ID) {
new
Float: fVehPos[4];
GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
GetPlayerFacingAngle(playerid, fVehPos[3]);
CreatedCars[iIterator] = CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2], fVehPos[3], iColors[0], iColors[1], -1);
VehicleFuel[CreatedCars[iIterator]] = 100.0;
LinkVehicleToInterior(CreatedCars[iIterator], GetPlayerInterior(playerid));
return SendClientMessageEx(playerid, COLOR_GREY, "Vehicle spawned!");
}
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
return 1;
}
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2010
Location: Brasília
Posts: 4,255
Reputation: 474
|
pawn Code:
pawn Code:
|
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2012
Location: Cebu City Philippines 6000
Posts: 260
Reputation: 14
|
it wont make the car
or spawn a vehicle it will only appear SERVER Unknown Command |
|
|
|
|
|
#5 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Apr 2012
Location: Philippines
Posts: 231
Reputation: 36
|
You sure ZCMD use this?
pawn Code:
NO, change it to pawn Code:
and also this pawn Code:
|
|
|
|
|
|
#6 | |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2012
Location: Cebu City Philippines 6000
Posts: 260
Reputation: 14
|
Quote:
well its changeable on how the way you like not just because all scripters use params and its allways params you can make it all the way you like like cmd[] or etc |
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2011
Location: Bucharest, Romania
Posts: 527
Reputation: 83
|
Yes, you're right, the parameters can be whatever you want ( not numbers ) :
Code:
CMD:hey( p, prm[ ] ) pawn Code:
Functions: pawn Code:
EDIT: Modified the command... Last edited by aRoach; 17/04/2012 at 07:34 AM. Reason: Oups! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] Using Zcmd and Sscanf | Markx | Tutorials | 33 | 07/02/2012 03:18 PM |
| How to use zcmd without sscanf | CrazyLess | Scripting Help | 6 | 04/10/2011 12:28 AM |
| zcmd&sscanf | brightas | Help Archive | 1 | 04/02/2011 03:15 PM |
| Need help with sscanf + zcmd | KotoK | Help Archive | 2 | 02/02/2011 05:47 PM |
| [Help]Zcmd & sscanf | Dirty_bum | Help Archive | 3 | 28/10/2009 11:10 AM |