Hallo!
CMD:setrank(playerid,params[])
{
if(GetPVarInt(playerid,"Leader") == 0)return SendClientMessage(playerid,0xFFFFFF,"{FFFF00}[SERVER] {FF0000}Diesen Befehl kannst du nicht nutzen.");
new pID, rank;
if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,0xFFFFFF,"{FFFF00}[SERVER] {005555}/setrank [PartOfName/PlayerID] [Rank]");
if(rank<0||rank>6)return SendClientMessage(playerid,ROT,"*Bitte gültigen Rang angeben.");
if(IsPlayerConnected(pID))
{
SetPVarInt(pID,"FRank",rank);
new neulohn[64];
if(GetPVarInt(playerid,"Fraktion") == 1)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="2000";}
case 2:{neulohn="4000";}
case 3:{neulohn="6000";}
case 4:{neulohn="8000";}
case 5:{neulohn="10000";}
case 6:{neulohn="12000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 2)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="2200";}
case 2:{neulohn="4400";}
case 3:{neulohn="6600";}
case 4:{neulohn="8800";}
case 5:{neulohn="11000";}
case 6:{neulohn="13600";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 3)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 4)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 5)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1000";}
case 2:{neulohn="2000";}
case 3:{neulohn="3000";}
case 4:{neulohn="4000";}
case 5:{neulohn="5000";}
case 6:{neulohn="6000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 6)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="2200";}
case 2:{neulohn="4400";}
case 3:{neulohn="6600";}
case 4:{neulohn="8800";}
case 5:{neulohn="11000";}
case 6:{neulohn="13600";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 7)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 8)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 9)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 10)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 11)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 12)
{
switch(GetPVarInt(pID,"FRank"))
{
case 0:{neulohn="0";}
case 1:{neulohn="1500";}
case 2:{neulohn="3000";}
case 3:{neulohn="4500";}
case 4:{neulohn="6000";}
case 5:{neulohn="7500";}
case 6:{neulohn="9000";}
}
}
else if(GetPVarInt(playerid,"Fraktion") == 0)
{
switch(GetPVarInt(playerid,"Lohn"))
{
case 0:{neulohn="0";}
case 1:{neulohn="0";}
case 2:{neulohn="0";}
case 3:{neulohn="0";}
case 4:{neulohn="0";}
case 5:{neulohn="0";}
case 6:{neulohn="0";}
}
}
SetPVarInt(pID,"Lohn",neulohn);
SpielerSpeichern(pID);
SendClientMessage(pID,GRÜN,"Du du ein neuen Rank erhalten. Herzlichen Glückwunsch");
SendClientMessage(playerid,GRÜN,"*Du hast jemand ein neuen Rank gegeben");
return 1;
}
return 1;
}
Wo ist da der Error? >> C:\Users\Spikes\Desktop\Testserver\gamemodes\rp.pwn(1752) : error 035: argument type mismatch (argument 3) (Error zeile SetPVarInt(pID,"Lohn",neulohn);)