Warnings
#1

The Warnings:
Quote:

C:\Users\Raz\Desktop\New folder\gamemodes\sampmod.pwn(6733) : warning 202: number of arguments does not match definition
C:\Users\Raz\Desktop\New folder\gamemodes\sampmod.pwn(6733) : warning 202: number of arguments does not match definition
C:\Users\Raz\Desktop\New folder\gamemodes\sampmod.pwn(6733) : warning 202: number of arguments does not match definition
C:\Users\Raz\Desktop\New folder\gamemodes\sampmod.pwn(6733) : warning 202: number of arguments does not match definition

The line:
Код:
if(strcmp(cmdtext,"/AA", true ) == 0 ) return Teleport(playerid, "Welcom To Stunts Zone 2!", 373.6937,2474.2234,16.4844,78.0672,0,0),ResetPlayerWeapons(playerid);
in the start i ignored them but then it sent me to the famous annoying flying in the air farm:
http://www.gta.cz/data/eng-sanandrea...arry_acrea.jpg
Thanks to ****** on the picture
Reply
#2

Could you show the Teleport function header? Probably not using the correct number of args for it.
Reply
#3

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Could you show the Teleport function header? Probably not using the correct number of args for it.
i have edited the topic BTW
here is the function:
Код:
//==============================================================================
stock Teleport(playerid, telename[], Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa,vw,interior)
{
	if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 553 && 520 && 593 && 512 && 511 && 577 && 592 && 556 && 557 && 601 && 432 && 476 && 449 && 519 && 532 && 406 && 570 && 594 && 564 && 465 && 501 && 464 && 446 && 513 && 441 && 454 && 452 && 460 && 453 && 430 && 484 && 595 && 493 && 473 && 472 && 447 && 469 && 425)return SendClientMessage(playerid,COLOR_KRED,"! לא ניתן להשתגר עם רכב זה");
	format(String, sizeof(String), "%s",telename),SendClientMessage(playerid,COLOR_LIGHTGREEN,String);
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SetVehiclePos(GetPlayerVehicleID(playerid),Vx,Vy,Vz+0.2),SetVehicleZAngle(GetPlayerVehicleID(playerid),Va),SetCameraBehindPlayer(playerid),SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),vw),LinkVehicleToInterior(GetPlayerVehicleID(playerid),interior);
	else SetPlayerPosEx(playerid,Px,Py,Pz,Pa),SetCameraBehindPlayer(playerid);
	SetPlayerInterior(playerid,interior),SetPlayerVirtualWorld(playerid,vw);
	return 1;
}
//==============================================================================
stock TeleportFoot(playerid, telename[],Float:Px, Float:Py, Float:Pz, Float:Pa,vw,interior)
{
	format(String, sizeof(String), "%s",telename),SendClientMessage(playerid,COLOR_LIGHTGREEN,String),SetPlayerPosEx(playerid,Px,Py,Pz,Pa),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid, interior),SetPlayerVirtualWorld(playerid, vw);
	return 1;
}
stock SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Float:a)return SetPlayerPos(playerid, x, y, z), SetPlayerFacingAngle(playerid, a);
//==============================================================================
Reply
#4

Quote:
Originally Posted by RazSofer
Посмотреть сообщение
The Warnings:

The line:
Код:
if(strcmp(cmdtext,"/AA", true ) == 0 ) return Teleport(playerid, "Welcom To Stunts Zone 2!", 373.6937,2474.2234,16.4844,78.0672,0,0),ResetPlayerWeapons(playerid);
Код:
if(strcmp(cmdtext,"/AA", true ) == 0 ) return SendClientMessage(playerid, COLOR_GREEN, "Welcom To Stunts Zone 2!");
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,373.6937,2474.2234,16.4844);
SetPlayerFacingAngle( playerid, 80);
Reply
#5

Quote:
Originally Posted by RazSofer
Посмотреть сообщение
i have edited the topic BTW
here is the function:
Yes you are using 8 args for the teleport func, but it expects 12.
Reply
#6

Quote:
Originally Posted by GalaxyHostFree
Посмотреть сообщение
Код:
if(strcmp(cmdtext,"/AA", true ) == 0 ) return SendClientMessage(playerid, COLOR_GREEN, "Welcom To Stunts Zone 2!");
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,373.6937,2474.2234,16.4844);
SetPlayerFacingAngle( playerid, 80);
its compiling without error and warning(Yey ), i will do gmx to the server and update you about the farm error
Reply
#7

Quote:
Originally Posted by GalaxyHostFree
Посмотреть сообщение
Код:
if(strcmp(cmdtext,"/AA", true ) == 0 ) return SendClientMessage(playerid, COLOR_GREEN, "Welcom To Stunts Zone 2!");
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,373.6937,2474.2234,16.4844);
SetPlayerFacingAngle( playerid, 80);
like i said, it compiles without errors and warnings, but now it's not teleporting me.
(Sorry for the double post)
Reply
#8

Quote:
Originally Posted by RazSofer
Посмотреть сообщение
like i said, it compiles without errors and warnings, but now it's not teleporting me.
(Sorry for the double post)
The "stock Teleport" you gave will not do anything. What I gave you is a very simple teleport system.

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext,"/AA",true))
    {            
        ResetPlayerWeapons(playerid);
        SetPlayerPos(playerid, 373.6937,2474.2234,16.4844);
        SetPlayerFacingAngle( playerid, 80);
        return 1;
    }
    return 0;
}
Reply
#9

Quote:
Originally Posted by GalaxyHostFree
Посмотреть сообщение
The "stock Teleport" you gave will not do anything. What I gave you is a very simple teleport system.

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext,"/AA",true))
    {            
        ResetPlayerWeapons(playerid);
        SetPlayerPos(playerid, 373.6937,2474.2234,16.4844);
        SetPlayerFacingAngle( playerid, 80);
        return 1;
    }
    return 0;
}
Now it's great! thanks men
Reply
#10

If you want it to be like the stock. then move all script from to stock to what I gave you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)